ui refactor
This commit is contained in:
40
app/lib/api/notifications.ts
Normal file
40
app/lib/api/notifications.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
export interface Notification {
|
||||
id: string;
|
||||
title: string;
|
||||
message: string;
|
||||
type: 'info' | 'warning' | 'error' | 'success';
|
||||
read: boolean;
|
||||
timestamp: string;
|
||||
}
|
||||
|
||||
export const getNotifications = async (): Promise<Notification[]> => {
|
||||
/*
|
||||
* TODO: Implement actual notifications logic
|
||||
* This is a mock implementation
|
||||
*/
|
||||
return [
|
||||
{
|
||||
id: 'notif-1',
|
||||
title: 'Welcome to Bolt',
|
||||
message: 'Get started by exploring the features',
|
||||
type: 'info',
|
||||
read: true,
|
||||
timestamp: new Date().toISOString(),
|
||||
},
|
||||
{
|
||||
id: 'notif-2',
|
||||
title: 'New Update Available',
|
||||
message: 'Version 1.0.1 is now available',
|
||||
type: 'info',
|
||||
read: false,
|
||||
timestamp: new Date().toISOString(),
|
||||
},
|
||||
];
|
||||
};
|
||||
|
||||
export const markNotificationRead = async (notificationId: string): Promise<void> => {
|
||||
/*
|
||||
* TODO: Implement actual notification read logic
|
||||
*/
|
||||
console.log(`Marking notification ${notificationId} as read`);
|
||||
};
|
||||
Reference in New Issue
Block a user