mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-10 07:25:35 +00:00
feat: recreate dashboard page from previous version
This commit is contained in:
16
inertia/contexts/favorites_context.ts
Normal file
16
inertia/contexts/favorites_context.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import type Link from '#models/link';
|
||||
import { createContext } from 'react';
|
||||
|
||||
type FavoritesContextType = {
|
||||
favorites: Link[];
|
||||
};
|
||||
|
||||
const iFavoritesContextState = {
|
||||
favorites: [] as Link[],
|
||||
};
|
||||
|
||||
const FavoritesContext = createContext<FavoritesContextType>(
|
||||
iFavoritesContextState
|
||||
);
|
||||
|
||||
export default FavoritesContext;
|
||||
Reference in New Issue
Block a user