v0.12.0 codes for FCM and rebranded jama to RosterChirp
This commit is contained in:
@@ -3,10 +3,10 @@ import { useAuth } from '../contexts/AuthContext.jsx';
|
||||
import Avatar from './Avatar.jsx';
|
||||
|
||||
function useTheme() {
|
||||
const [dark, setDark] = useState(() => localStorage.getItem('jama-theme') === 'dark');
|
||||
const [dark, setDark] = useState(() => localStorage.getItem('rosterchirp-theme') === 'dark');
|
||||
useEffect(() => {
|
||||
document.documentElement.setAttribute('data-theme', dark ? 'dark' : 'light');
|
||||
localStorage.setItem('jama-theme', dark ? 'dark' : 'light');
|
||||
localStorage.setItem('rosterchirp-theme', dark ? 'dark' : 'light');
|
||||
}, [dark]);
|
||||
return [dark, setDark];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user