Skip to content

Commit 50882a3

Browse files
committed
refactor: update color mode switch
1 parent f99e436 commit 50882a3

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/js/color-modes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
(() => {
88
'use strict'
99

10-
const THEME = 'coreui-docs-theme'
10+
const THEME = 'coreui-free-bootstrap-admin-template-theme'
1111

1212
const storedTheme = localStorage.getItem(THEME)
1313

src/js/config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@
88
(() => {
99
'use strict'
1010

11+
const THEME = 'coreui-free-bootstrap-admin-template-theme'
1112
const urlParams = new URLSearchParams(window.location.href.split('?')[1])
1213

1314
if (urlParams.get('theme') && ['auto', 'dark', 'light'].includes(urlParams.get('theme'))) {
14-
localStorage.setItem('theme', urlParams.get('theme'))
15+
localStorage.setItem(THEME, urlParams.get('theme'))
1516
}
1617
})()

0 commit comments

Comments
 (0)