Browse Source

store the active theme

Sven Czarnian 2 năm trước cách đây
mục cha
commit
c3f36bae01
1 tập tin đã thay đổi với 8 bổ sung0 xóa
  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');
+  }
 }