mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-10 15:35:35 +00:00
17 lines
321 B
TypeScript
17 lines
321 B
TypeScript
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;
|