From 59c9f39dcaf50ea925c3d049ffa328bcf380cc53 Mon Sep 17 00:00:00 2001 From: phoebus-84 Date: Fri, 3 May 2024 19:34:59 +0200 Subject: [PATCH] fix: notifications to history --- src/lib/components/tabs/TabPage.svelte | 3 +-- src/lib/components/tabs/index.ts | 2 +- src/routes/[[lang]]/(protected)/(tabs)/+layout.svelte | 2 +- .../(tabs)/{notifications => history}/+page.svelte | 8 +++++--- .../(tabs)/{notifications => history}/+page.ts | 0 5 files changed, 8 insertions(+), 7 deletions(-) rename src/routes/[[lang]]/(protected)/(tabs)/{notifications => history}/+page.svelte (74%) rename src/routes/[[lang]]/(protected)/(tabs)/{notifications => history}/+page.ts (100%) diff --git a/src/lib/components/tabs/TabPage.svelte b/src/lib/components/tabs/TabPage.svelte index 879ebe7..2c10a4a 100644 --- a/src/lib/components/tabs/TabPage.svelte +++ b/src/lib/components/tabs/TabPage.svelte @@ -4,11 +4,10 @@ export let tab: Tab; export let title: string; - export let settings = false -
{title}
+
{title}
diff --git a/src/lib/components/tabs/index.ts b/src/lib/components/tabs/index.ts index 60cff81..6c90870 100644 --- a/src/lib/components/tabs/index.ts +++ b/src/lib/components/tabs/index.ts @@ -1,6 +1,6 @@ export const Tabs = { home: 'home', - notifications: 'notifications', + history: 'history', profile: 'profile' } as const; diff --git a/src/routes/[[lang]]/(protected)/(tabs)/+layout.svelte b/src/routes/[[lang]]/(protected)/(tabs)/+layout.svelte index ed8f551..ab92820 100644 --- a/src/routes/[[lang]]/(protected)/(tabs)/+layout.svelte +++ b/src/routes/[[lang]]/(protected)/(tabs)/+layout.svelte @@ -11,7 +11,7 @@ const tabs: IonTabProps[] = [ { label: 'Home', icon: home, tab: Tabs.home }, - { label: 'Notifications', icon: notificationsOutline, tab: Tabs.notifications }, + { label: 'History', icon: notificationsOutline, tab: Tabs.history }, { label: 'Profile', icon: personOutline, tab: Tabs.profile } ]; diff --git a/src/routes/[[lang]]/(protected)/(tabs)/notifications/+page.svelte b/src/routes/[[lang]]/(protected)/(tabs)/history/+page.svelte similarity index 74% rename from src/routes/[[lang]]/(protected)/(tabs)/notifications/+page.svelte rename to src/routes/[[lang]]/(protected)/(tabs)/history/+page.svelte index a1e6ef0..d40813b 100644 --- a/src/routes/[[lang]]/(protected)/(tabs)/notifications/+page.svelte +++ b/src/routes/[[lang]]/(protected)/(tabs)/history/+page.svelte @@ -1,14 +1,16 @@ - +
- {#each verifiedSids as verifiedSid} + {#each verifiedSids.reverse() as verifiedSid}
{verifiedSid.sid} @@ -17,7 +19,7 @@
- {dayjs.unix(verifiedSid.at).toString()} + {dayjs().to(dayjs.unix(verifiedSid.at))}
diff --git a/src/routes/[[lang]]/(protected)/(tabs)/notifications/+page.ts b/src/routes/[[lang]]/(protected)/(tabs)/history/+page.ts similarity index 100% rename from src/routes/[[lang]]/(protected)/(tabs)/notifications/+page.ts rename to src/routes/[[lang]]/(protected)/(tabs)/history/+page.ts