More updates to realtime.
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user