Prechádzať zdrojové kódy

store the active theme

Sven Czarnian 2 rokov pred
rodič
commit
c3f36bae01
1 zmenil súbory, kde vykonal 8 pridanie a 0 odobranie
  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');
+  }
 }