parent
086141d491
commit
6b98f65e8c
@ -1,25 +1,38 @@ |
|||||||
<template> |
<template> |
||||||
<StickyCourses /> |
<StickyCourses /> |
||||||
<SessionTabs class="mb-4" /> |
<SessionTabs class="mb-4" /> |
||||||
<SessionsLoading :is-loading="isLoading" /> |
|
||||||
|
|
||||||
<!-- All sessions --> |
<div class="relative min-h-[300px]"> |
||||||
<!-- <SessionListWrapper :sessions="sessionList"/>--> |
<Loading :visible="!isFullyLoaded" /> |
||||||
|
|
||||||
<SessionCategoryView |
<SessionsLoading :is-loading="isLoading" /> |
||||||
v-if="!isLoading" |
|
||||||
:categories="categories" |
<SessionCategoryView |
||||||
:categories-with-sessions="categoriesWithSessions" |
v-if="!isLoading" |
||||||
:uncategorized-sessions="uncategorizedSessions" |
:categories="categories" |
||||||
/> |
:categories-with-sessions="categoriesWithSessions" |
||||||
|
:uncategorized-sessions="uncategorizedSessions" |
||||||
|
/> |
||||||
|
</div> |
||||||
</template> |
</template> |
||||||
|
|
||||||
<script setup> |
<script setup> |
||||||
|
import { ref, watch, nextTick } from "vue" |
||||||
import SessionTabs from "../../../components/session/SessionTabs.vue" |
import SessionTabs from "../../../components/session/SessionTabs.vue" |
||||||
import StickyCourses from "../../../views/user/courses/StickyCourses.vue" |
import StickyCourses from "../../../views/user/courses/StickyCourses.vue" |
||||||
import SessionCategoryView from "../../../components/session/SessionCategoryView" |
import SessionCategoryView from "../../../components/session/SessionCategoryView" |
||||||
import { useSession } from "./session" |
import { useSession } from "./session" |
||||||
import SessionsLoading from "./SessionsLoading.vue" |
import SessionsLoading from "./SessionsLoading.vue" |
||||||
|
import Loading from "../../../components/Loading.vue" |
||||||
|
|
||||||
const { isLoading, uncategorizedSessions, categories, categoriesWithSessions } = useSession("current") |
const { isLoading, uncategorizedSessions, categories, categoriesWithSessions } = useSession("current") |
||||||
|
const isFullyLoaded = ref(false) |
||||||
|
|
||||||
|
watch(isLoading, async (newVal) => { |
||||||
|
if (!newVal) { |
||||||
|
await new Promise((resolve) => setTimeout(resolve, 500)) |
||||||
|
await nextTick() |
||||||
|
isFullyLoaded.value = true |
||||||
|
} |
||||||
|
}) |
||||||
</script> |
</script> |
||||||
|
Loading…
Reference in new issue