Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

refactor: remove unused toggle-theme method

Harsh Karandec21f151d45b0
diff --git a/studio/stores/UiStore.ts b/studio/stores/UiStore.ts
index 47131922f58..eae272deebf 100644
--- a/studio/stores/UiStore.ts
+++ b/studio/stores/UiStore.ts
@@ -15,7 +15,6 @@ export interface IUiStore {
profile?: User
load: () => void
- toggleTheme: () => void
setTheme: (theme: 'dark' | 'light') => void
setProjectRef: (ref?: string) => void
setOrganizationSlug: (slug?: string) => void
@@ -83,15 +82,6 @@ export default class UiStore implements IUiStore {
this.setTheme('dark')
}
- toggleTheme() {
- if (this.theme === 'dark') {
- window.localStorage.setItem('theme', 'light')
- return this.setTheme('light')
- }
- window.localStorage.setItem('theme', 'dark')
- this.setTheme('dark')
- }
-
setTheme(theme: 'dark' | 'light') {
this.theme = theme
document.body.className = theme