Skip to content

Commit e3a68c4

Browse files
authored
chore: Merge branch dev to main (ReVanced#375)
2 parents 4daf093 + bab94bd commit e3a68c4

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/routes/+layout.svelte

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import '../app.css';
33
import { QueryClientProvider } from '@tanstack/svelte-query';
44
import { browser } from '$app/environment';
5-
5+
import { isScheduled } from '$lib/utils';
66
import AppShell from '$components/organisms/AppShell.svelte';
77
import type { WithChildren } from '$types';
88
import { theme } from '$stores';
@@ -15,6 +15,10 @@
1515
let { children, data }: WithChildren & { data: LayoutData } = $props();
1616
useHolidayTheme();
1717
18+
let publishedAnnouncements = $derived(
19+
(data.latestAnnouncements ?? []).filter(item => !isScheduled(item.created_at))
20+
);
21+
1822
$effect(() => {
1923
if (browser) {
2024
document.documentElement.setAttribute('data-theme', theme.current);
@@ -23,7 +27,7 @@
2327
</script>
2428

2529
<QueryClientProvider client={queryClient}>
26-
<AppShell about={data.about} latestAnnouncements={data.latestAnnouncements}>
30+
<AppShell about={data.about} latestAnnouncements={publishedAnnouncements}>
2731
{@render children()}
2832
</AppShell>
2933
</QueryClientProvider>

0 commit comments

Comments
 (0)