mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-09 07:03:25 +00:00
17 lines
361 B
TypeScript
17 lines
361 B
TypeScript
import { createContext } from 'react';
|
|
import { LinkWithCollection } from '~/types/app';
|
|
|
|
type FavoritesContextType = {
|
|
favorites: LinkWithCollection[];
|
|
};
|
|
|
|
const iFavoritesContextState = {
|
|
favorites: [] as LinkWithCollection[],
|
|
};
|
|
|
|
const FavoritesContext = createContext<FavoritesContextType>(
|
|
iFavoritesContextState
|
|
);
|
|
|
|
export default FavoritesContext;
|