Files
web-probindo/resources/js/hooks/use-portfolio.ts
T
afriadirahman 8c6dad2a31
tests / ci (push) Canceled after 0s
Admin Panel
2026-09-29 14:57:37 +07:00

11 lines
338 B
TypeScript

import { usePage } from '@inertiajs/react';
import { portfolio } from '@/data/projects';
import type { Project } from '@/types';
/** Portfolio helpers for pages that receive a `projects` prop. */
export function usePortfolio() {
const { projects } = usePage<{ projects: Project[] }>().props;
return portfolio(projects ?? []);
}