Renaming transition and adding to the auth layout.

This commit is contained in:
Bradley Shellnut 2023-09-19 12:48:39 +12:00
parent 3ead1dc357
commit 140b312916
4 changed files with 17 additions and 4 deletions

View file

@ -1,5 +1,5 @@
<script lang="ts">
import { fade, fly } from 'svelte/transition';
import { fade } from 'svelte/transition';
interface Transition {
type: 'fade' | 'stagger' | 'page';

View file

@ -1,6 +1,6 @@
<script lang="ts">
import 'iconify-icon';
import Transition from '$lib/components/transition/index.svelte';
import Transition from '$lib/components/transition.svelte';
import Header from '$lib/components/header/index.svelte';
import Footer from '$lib/components/footer.svelte';

View file

@ -0,0 +1,9 @@
import { loadFlash } from 'sveltekit-flash-message/server';
import type { LayoutServerLoad } from './$types';
export const load: LayoutServerLoad = loadFlash(async ({ url, locals }) => {
return {
url: url.pathname,
user: locals.user
};
});

View file

@ -2,6 +2,9 @@
import { page } from "$app/stores";
import { Button } from "$lib/components/ui/button";
import Logo from "$lib/components/logo.svelte";
import Transition from '$lib/components/transition.svelte';
export let data;
</script>
<div class="container">
@ -38,9 +41,10 @@
</blockquote>
</div>
</div>
<div class="auth-form">
<slot />
<Transition url={data.url} transition={{ type: 'page' }}>
<slot />
</Transition>
</div>
</div>