fix: course page rerendering twice
This commit is contained in:
@@ -59,7 +59,7 @@
|
||||
"@babel/plugin-transform-runtime": "^7.22.9",
|
||||
"@babel/preset-env": "^7.22.9",
|
||||
"@babel/runtime": "^7.22.6",
|
||||
"@sveltejs/kit": "^1.22.4",
|
||||
"@sveltejs/kit": "^1.29.0",
|
||||
"@tailwindcss/typography": "^0.5.9",
|
||||
"@types/lodash": "^4.14.196",
|
||||
"@types/nodemailer": "^6.4.11",
|
||||
|
||||
@@ -118,6 +118,15 @@ code {
|
||||
fill: red;
|
||||
}
|
||||
|
||||
.org-root {
|
||||
height: calc(100vh - 48px);
|
||||
}
|
||||
.org-slot {
|
||||
min-width: calc(100vw - 250px);
|
||||
height: calc(100vh - 48px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
@tailwind components;
|
||||
|
||||
@tailwind utilities;
|
||||
|
||||
@@ -318,26 +318,7 @@
|
||||
{/if}
|
||||
|
||||
<div class="flex justify-between">
|
||||
{#if isOrgPage($page.url?.pathname)}
|
||||
<AddOrgModal />
|
||||
<div class="org-root w-full flex items-center justify-between">
|
||||
{#if !isQuizPage($page.url?.pathname)}
|
||||
<OrgSideBar />
|
||||
{/if}
|
||||
<div class="org-slot bg-white dark:bg-black w-full">
|
||||
<slot />
|
||||
</div>
|
||||
</div>
|
||||
{:else if isLMSPage($page.url?.pathname)}
|
||||
<div class="org-root w-full flex items-center justify-between">
|
||||
<LMSSideBar />
|
||||
<div class="org-slot bg-white dark:bg-black w-full">
|
||||
<slot />
|
||||
</div>
|
||||
</div>
|
||||
{:else}
|
||||
<slot />
|
||||
{/if}
|
||||
<slot />
|
||||
|
||||
{#if showAppsSideBar(path)}
|
||||
<Apps />
|
||||
@@ -352,15 +333,6 @@
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.org-root {
|
||||
height: calc(100vh - 48px);
|
||||
}
|
||||
.org-slot {
|
||||
min-width: calc(100vw - 250px);
|
||||
height: calc(100vh - 48px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
:global(a:hover) {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<script>
|
||||
import LMSSideBar from '$lib/components/LMS/SideBar.svelte';
|
||||
</script>
|
||||
|
||||
<div class="org-root w-full flex items-center justify-between">
|
||||
<LMSSideBar />
|
||||
<div class="org-slot bg-white dark:bg-black w-full">
|
||||
<slot />
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,17 @@
|
||||
<script>
|
||||
import { page } from '$app/stores';
|
||||
import AddOrgModal from '$lib/components/Org/AddOrgModal/AddOrgModal.svelte';
|
||||
import { isQuizPage } from '$lib/utils/functions/app';
|
||||
import OrgSideBar from '$lib/components/Org/SideBar.svelte';
|
||||
</script>
|
||||
|
||||
<AddOrgModal />
|
||||
|
||||
<div class="org-root w-full flex items-center justify-between">
|
||||
{#if !isQuizPage($page.url?.pathname)}
|
||||
<OrgSideBar />
|
||||
{/if}
|
||||
<div class="org-slot bg-white dark:bg-black w-full">
|
||||
<slot />
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user