Fix issue with edge function

This commit is contained in:
Rotimi Best
2023-08-03 19:31:59 +01:00
parent 22e593c114
commit fc6c7ddb71
4 changed files with 22 additions and 21 deletions
@@ -59,8 +59,10 @@
}
onMount(() => {
if (localStorage.getItem('hideCourseNav')) {
show = localStorage.getItem('hideCourseNav') === 'false';
if (browser) {
if (localStorage.getItem('hideCourseNav')) {
show = localStorage.getItem('hideCourseNav') === 'false';
}
} else {
show = true;
}
+6 -7
View File
@@ -1,5 +1,6 @@
<script>
import { page } from '$app/stores';
import { browser } from '$app/environment';
import NotificationIcon from 'carbon-icons-svelte/lib/Notification.svelte';
import Moon from 'carbon-icons-svelte/lib/Moon.svelte';
import Sun from 'carbon-icons-svelte/lib/Sun.svelte';
@@ -14,19 +15,17 @@
$appStore.isDark = !$appStore.isDark;
toggleBodyByTheme($appStore.isDark);
localStorage.setItem('theme', $appStore.isDark ? 'dark' : '');
if (browser) {
localStorage.setItem('theme', $appStore.isDark ? 'dark' : '');
}
}
</script>
<nav class="{navClass} flex w-full p-2 md:px-6 bg-blue-600">
<ul class="flex w-full items-center">
<div class="">
<a
href={$page.url.pathname}
title="Go to ClassroomIO Home"
id="logo"
class="text-lg"
>
<a href={$page.url.pathname} title="Go to ClassroomIO Home" id="logo" class="text-lg">
ClassroomIO
</a>
</div>
+5 -7
View File
@@ -1,5 +1,6 @@
<script>
import { page } from '$app/stores';
import { browser } from '$app/environment';
import NotificationIcon from 'carbon-icons-svelte/lib/Notification.svelte';
import MoonIcon from 'carbon-icons-svelte/lib/Moon.svelte';
import SunIcon from 'carbon-icons-svelte/lib/Sun.svelte';
@@ -14,19 +15,16 @@
$appStore.isDark = !$appStore.isDark;
toggleBodyByTheme($appStore.isDark);
localStorage.setItem('theme', $appStore.isDark ? 'dark' : '');
if (browser) {
localStorage.setItem('theme', $appStore.isDark ? 'dark' : '');
}
}
</script>
<nav class="{navClass} flex w-full p-2 md:px-6 bg-blue-600">
<ul class="flex w-full items-center">
<div class="">
<a
href={$page.url.pathname}
title="Go to ClassroomIO Home"
id="logo"
class="text-lg"
>
<a href={$page.url.pathname} title="Go to ClassroomIO Home" id="logo" class="text-lg">
ClassroomIO
</a>
</div>