import { client } from '@/ui/api/client' import { useQuery } from '@tanstack/react-query' import { createFileRoute, Outlet } from '@tanstack/react-router' function ShareLayout() { const { shareId } = Route.useParams() const { data: shareInfo, isLoading, error, } = useQuery({ queryKey: ['share-info', shareId], queryFn: async () => { const res = await client.api.shares[':shareId'].info.$get({ param: { shareId }, }) if (!res.ok) throw new Error('Failed to fetch share info') return await res.json() }, }) if (isLoading) return