fix linting issues

pull/1760/merge
Joseph Izang 3 years ago committed by yann300
parent 7e90b119db
commit c2767efe7f
  1. 2
      apps/remix-ide/src/app/tabs/theme-module.js
  2. 8
      libs/remix-ui/theme-module/src/lib/remix-ui-theme-module.tsx

@ -105,7 +105,7 @@ export class ThemeModule extends Plugin {
throw new Error(`Theme ${themeName} doesn't exist`)
}
const next = themeName || this.active // Name
if (next === this.active) return
if (next === this.active) return // --> exit out of this method
_paq.push(['trackEvent', 'themeModule', 'switchTo', next])
const nextTheme = this.themes[next] // Theme
if (!this.forced) this._deps.config.set('settings/theme', next)

@ -58,13 +58,11 @@ const defaultThemes = [
];
export function RemixUiThemeModule({ themeModule }: RemixUiThemeModuleProps) {
const [themeName, setThemeName] = useState('');
const [themes, _] = useState<Theme[]>(defaultThemes);
const themeRef = useRef<any>(null);
const [themeName, setThemeName] = useState('')
useEffect(() => {
themeModule.switchTheme()
}, [themeName, themeModule]);
}, [themeName, themeModule])
return (
<div className="border-top">
@ -102,7 +100,7 @@ export function RemixUiThemeModule({ themeModule }: RemixUiThemeModuleProps) {
</div>
</div>
</div>
);
)
}
export default RemixUiThemeModule;

Loading…
Cancel
Save