Parcourir la source

store the active theme

Sven Czarnian il y a 2 ans
Parent
commit
c3f36bae01
1 fichiers modifiés avec 8 ajouts et 0 suppressions
  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');
+  }
 }