Skip to content

Commit

Permalink
Remove suspense support from App.vue
Browse files Browse the repository at this point in the history
While we want to have a way to support a loading visual, the logic that
needs to wait is now done before the application is mounted. We will need
to revisit this later with a different approach.

Signed-off-by: Jeremy Ho <jujaga@gmail.com>
  • Loading branch information
jujaga committed Feb 24, 2023
1 parent 4d2c896 commit 6235b87
Showing 1 changed file with 7 additions and 24 deletions.
31 changes: 7 additions & 24 deletions frontend/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@ import { onErrorCaptured } from 'vue';
import { RouterView } from 'vue-router';
// PrimeVue
import ConfirmDialog from 'primevue/confirmdialog';
import ProgressBar from 'primevue/progressbar';
import Toast from 'primevue/toast';
import { useToast } from 'primevue/usetoast';
// Components
import AppLayout from '@/components/layout/AppLayout.vue';
import InitApp from '@/components/layout/InitApp.vue';
import Navbar from '@/components/layout/Navbar.vue';
const toast = useToast();
Expand All @@ -26,27 +24,12 @@ onErrorCaptured((e: Error) => {
<template>
<Toast />
<ConfirmDialog />
<Suspense>
<AppLayout>
<template #nav>
<Navbar />
</template>
<template #main>
<RouterView /> <InitApp />
</template>
</AppLayout>

<!-- Loading -->
<template #fallback>
<AppLayout>
<template #nav />
<template #main>
<ProgressBar
mode="indeterminate"
style="height: 0.5em"
/>
</template>
</AppLayout>
<AppLayout>
<template #nav>
<Navbar />
</template>
<template #main>
<RouterView /> <InitApp />
</template>
</Suspense>
</AppLayout>
</template>

0 comments on commit 6235b87

Please sign in to comment.