From c2767efe7f5e3eaba52d5a67f348a910f0bf241f Mon Sep 17 00:00:00 2001 From: Joseph Izang Date: Fri, 10 Dec 2021 15:43:52 +0100 Subject: [PATCH] fix linting issues --- apps/remix-ide/src/app/tabs/theme-module.js | 2 +- .../theme-module/src/lib/remix-ui-theme-module.tsx | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/apps/remix-ide/src/app/tabs/theme-module.js b/apps/remix-ide/src/app/tabs/theme-module.js index a5cea0d2ff..5524199f1a 100644 --- a/apps/remix-ide/src/app/tabs/theme-module.js +++ b/apps/remix-ide/src/app/tabs/theme-module.js @@ -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) diff --git a/libs/remix-ui/theme-module/src/lib/remix-ui-theme-module.tsx b/libs/remix-ui/theme-module/src/lib/remix-ui-theme-module.tsx index c960827735..92002f3a66 100644 --- a/libs/remix-ui/theme-module/src/lib/remix-ui-theme-module.tsx +++ b/libs/remix-ui/theme-module/src/lib/remix-ui-theme-module.tsx @@ -58,13 +58,11 @@ const defaultThemes = [ ]; export function RemixUiThemeModule({ themeModule }: RemixUiThemeModuleProps) { - const [themeName, setThemeName] = useState(''); - const [themes, _] = useState(defaultThemes); - const themeRef = useRef(null); + const [themeName, setThemeName] = useState('') useEffect(() => { themeModule.switchTheme() - }, [themeName, themeModule]); + }, [themeName, themeModule]) return (
@@ -102,7 +100,7 @@ export function RemixUiThemeModule({ themeModule }: RemixUiThemeModuleProps) {
- ); + ) } export default RemixUiThemeModule;