Forráskód Böngészése

store the active theme

Sven Czarnian 2 éve
szülő
commit
c3f36bae01
1 módosított fájl, 8 hozzáadás és 0 törlés
  1. 8 0
      src/services/session.ts

+ 8 - 0
src/services/session.ts

@@ -10,4 +10,12 @@ export class Session {
   static bearerToken(): string | null {
     return localStorage.getItem('token');
   }
+
+  static setTheme(theme: string) {
+    localStorage.setItem('theme', theme);
+  }
+
+  static theme(): string | null {
+    return localStorage.getItem('theme');
+  }
 }