More updates to realtime.

This commit is contained in:
Mike Cao 2023-02-15 02:27:18 -08:00
parent 28921a7cd5
commit 93b77672f3
28 changed files with 218 additions and 263 deletions

View file

@ -51,7 +51,7 @@ export default function useLocale() {
}, [locale]);
useEffect(() => {
const url = new URL(window.location.href);
const url = new URL(window?.location?.href);
const locale = url.searchParams.get('locale');
if (locale) {

View file

@ -24,7 +24,7 @@ export default function useTheme() {
}, [theme]);
useEffect(() => {
const url = new URL(window.location.href);
const url = new URL(window?.location?.href);
const theme = url.searchParams.get('theme');
if (['light', 'dark'].includes(theme)) {