Convertir to typescript
This commit is contained in:
@@ -4,8 +4,19 @@ export const images = [
|
||||
'/img/c3.avif',
|
||||
];
|
||||
|
||||
export const homeItems = [
|
||||
export type HomeItem = {
|
||||
id: number;
|
||||
title: string;
|
||||
type: string;
|
||||
text: string;
|
||||
author: string;
|
||||
authorAvatar: string;
|
||||
image: string;
|
||||
};
|
||||
|
||||
export const homeItems: HomeItem[] = [
|
||||
{
|
||||
id: 1,
|
||||
title: 'Exploring Maui',
|
||||
type: 'Blog',
|
||||
text: 'We just got back from a trip to Maui, and we had a great time...',
|
||||
@@ -14,6 +25,7 @@ export const homeItems = [
|
||||
image: images[0],
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
title: 'Arctic Adventures',
|
||||
type: 'Blog',
|
||||
text:
|
||||
@@ -23,6 +35,7 @@ export const homeItems = [
|
||||
image: images[1],
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
title: 'Frolicking in the Faroe Islands',
|
||||
type: 'Blog',
|
||||
text:
|
||||
@@ -33,15 +46,32 @@ export const homeItems = [
|
||||
},
|
||||
];
|
||||
|
||||
export const notifications = [
|
||||
{ title: 'New friend request', when: '6 hr' },
|
||||
{ title: 'Please change your password', when: '1 day' },
|
||||
{ title: 'You have a new message', when: '2 weeks' },
|
||||
{ title: 'Welcome to the app!', when: '1 month' },
|
||||
export type NotificationItem = {
|
||||
id: number;
|
||||
title: string;
|
||||
when: string;
|
||||
};
|
||||
|
||||
export const notifications: NotificationItem[] = [
|
||||
{ id: 1, title: 'New friend request', when: '6 hr' },
|
||||
{ id: 2, title: 'Please change your password', when: '1 day' },
|
||||
{ id: 3, title: 'You have a new message', when: '2 weeks' },
|
||||
{ id: 4, title: 'Welcome to the app!', when: '1 month' },
|
||||
];
|
||||
|
||||
export type ListItem = {
|
||||
name: string;
|
||||
done?: boolean;
|
||||
}
|
||||
|
||||
export type TodoListItem = {
|
||||
name: string;
|
||||
id: string;
|
||||
items?: ListItem[];
|
||||
}
|
||||
|
||||
// Some fake lists
|
||||
export const lists = [
|
||||
export const lists: TodoListItem[] = [
|
||||
{
|
||||
name: 'Groceries',
|
||||
id: 'groceries',
|
||||
@@ -60,3 +90,11 @@ export const lists = [
|
||||
{ name: 'Work', id: 'work', items: [{ name: 'TPS Report' }, { name: 'Set up email' }] },
|
||||
{ name: 'Reminders', id: 'reminders' },
|
||||
];
|
||||
|
||||
export type Settings = {
|
||||
enableNotifications: boolean;
|
||||
}
|
||||
|
||||
export const settings: Settings = {
|
||||
enableNotifications: true,
|
||||
}
|
||||
Reference in New Issue
Block a user