Add frontend support for notifications
This commit is contained in:
12
frontend/src/routes/notifications/+page.server.ts
Normal file
12
frontend/src/routes/notifications/+page.server.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { fetchSubscriptions } from '$lib/api';
|
||||
import type { PageServerLoad } from './$types';
|
||||
|
||||
export const load: PageServerLoad = async () => {
|
||||
try {
|
||||
const subscriptions = await fetchSubscriptions();
|
||||
return { subscriptions };
|
||||
} catch (error) {
|
||||
console.error('Failed to load subscriptions:', error);
|
||||
return { subscriptions: [] };
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user