We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0acd212 commit 5f165deCopy full SHA for 5f165de
app/services/user-preference.js
@@ -4,13 +4,16 @@ export default class UserPreferenceService extends Service {
4
5
set theme(newTheme){
6
let date = new Date();
7
+
8
+ // seetting expiry date of 30 days
9
date.setTime( date.getTime() + (30 * 24 * 60 * 60 * 1000));
10
document.cookie = `theme=${newTheme};expires=${date.toUTCString()}`;
11
}
12
13
get theme(){
14
let cookieArr = document.cookie.split('=');
- if(cookieArr.length>0){
15
+ // console.log(cookieArr.length)
16
+ if(cookieArr.length>1){
17
return cookieArr[1];
18
19
return 'light';
app/styles/app.css
@@ -27,7 +27,6 @@
27
28
29
.buttonMode{
30
- /* background: transparent; */
31
border-radius: 12px;
32
padding: 9px;
33
width: 100px;
0 commit comments