Skip to content

Commit b21826c

Browse files
rushkiiammarfaizi2
authored andcommitted
chore(seo): move seo from layout to /home page
Move SEO from +layout.svelte to +page.svelte in /home page. Signed-off-by: Muhammad Rizki <[email protected]> Link: https://lore.gnuweeb.org/gwml/[email protected] Signed-off-by: Ammar Faizi <[email protected]>
1 parent 6c19cd4 commit b21826c

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

src/routes/(protected)/+layout.svelte

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,10 @@
33
import AppSidebar from "$components/customs/app-sidebar.svelte";
44
import Header from "$components/customs/header.svelte";
55
import Separator from "$components/ui/separator/separator.svelte";
6-
import Seo from "$components/customs/seo.svelte";
7-
import { useAuth } from "$lib/hooks/auth.svelte";
86
97
let { children } = $props();
10-
11-
const auth = useAuth();
128
</script>
139

14-
{#if auth.user && auth.token}
15-
<Seo
16-
title="{auth.user?.full_name} ({auth.user?.username}) - GNU/Weeb Mail"
17-
description="Configure your email client using this config"
18-
image={auth.user?.photo}
19-
/>
20-
{/if}
21-
2210
<Sidebar.Provider class="light">
2311
<AppSidebar />
2412

src/routes/(protected)/home/+page.svelte

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
import { mailConfig } from "$constants";
66
import { toast } from "svelte-sonner";
77
import { copyText } from "svelte-copy";
8+
import { useAuth } from "$lib/hooks/auth.svelte";
9+
import Seo from "$components/customs/seo.svelte";
10+
11+
const auth = useAuth();
812
913
const copy = async (text: string) => {
1014
try {
@@ -18,6 +22,12 @@
1822
};
1923
</script>
2024

25+
<Seo
26+
title="{auth.user?.full_name} ({auth.user?.username}) - GNU/Weeb Mail"
27+
description="Configure your email client using this config"
28+
image={auth.user?.photo}
29+
/>
30+
2131
<div class="flex h-full w-full justify-center">
2232
<Card.Root>
2333
<Card.Header class="py-5">

0 commit comments

Comments
 (0)