fix(schedule): SSR-safe props to prevent null component hydration error

This commit is contained in:
F4ilji
2026-08-31 19:45:12 +05:00
parent 7052b35c19
commit 712f172071
@@ -24,7 +24,7 @@ export default {
favoriteGroups: typeof window !== 'undefined' ? JSON.parse(localStorage.getItem('favoriteGroups') || '[]') : [],
showFavorites: false,
loading: false,
currentPageLoaded: this.schedules_paginator.current_page,
currentPageLoaded: this.schedules_paginator?.current_page ?? 1,
};
},
components: {
@@ -57,13 +57,16 @@ export default {
type: Object
},
seo: {
type: Object
type: Object,
default: () => ({})
},
breadcrumbs: {
type: Object
type: Object,
default: () => ({})
},
faculties: {
type: Object
type: Object,
default: () => ({})
},
},
methods: {
@@ -94,8 +97,8 @@ export default {
</script>
<template>
<MetaTags :seo="this.seo" />
<MainPageNavBar :sections="$page.props.navigation" />
<MetaTags :seo="seo" />
<MainPageNavBar :sections="$page.props?.navigation" />
<div class="flex flex-col h-screen">
<main class="flex-grow">