Skip to content

Open source personal finance application

fix(layouts): replace NuxtPage with slot for better component flexibility

Ilya Komichevc695d60d2ead
diff --git a/app/layouts/default.vue b/app/layouts/default.vue
index 9aacbadd..08902650 100644
--- a/app/layouts/default.vue
+++ b/app/layouts/default.vue
@@ -95,7 +95,7 @@ usePageScroll()
style="padding-bottom: calc(50px + env(safe-area-inset-bottom))"
class="@container/main grid h-full overflow-hidden overflow-y-auto"
>
- <NuxtPage :keepalive="{ include: keepalive }" />
+ <slot :keepalive="{ include: keepalive }" />
</main>
<TrnFormFloatOpener />
diff --git a/app/layouts/error.vue b/app/layouts/error.vue
index b25e75fd..9b17c3e2 100644
--- a/app/layouts/error.vue
+++ b/app/layouts/error.vue
@@ -18,6 +18,6 @@ if (Object.keys(route.query).length > 0)
<h1 @click="router.push('/')">
Go to home
</h1>
- <NuxtPage />
+ <slot />
</div>
</template>