mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-08 22:53:25 +00:00
13 lines
360 B
TypeScript
13 lines
360 B
TypeScript
import { PageProps } from '@adonisjs/inertia/types';
|
|
import { usePage } from '@inertiajs/react';
|
|
import { LinkWithCollection } from '~/types/app';
|
|
|
|
interface UseFavoriteLinksProps {
|
|
favoriteLinks: LinkWithCollection[];
|
|
}
|
|
|
|
export const useFavoriteLinks = () => {
|
|
const { props } = usePage<PageProps & UseFavoriteLinksProps>();
|
|
return props.favoriteLinks;
|
|
};
|