feat(platform): harden access scoping and delivery baseline
This commit is contained in:
@@ -18,11 +18,11 @@ type ProjectDragContextResult = {
|
||||
project: any | null;
|
||||
};
|
||||
|
||||
export function useProjectDragContext(projectId: string | null): ProjectDragContextResult {
|
||||
export function useProjectDragContext(projectId: string | null, enabled = true): ProjectDragContextResult {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const { data } = trpc.timeline.getProjectContext.useQuery(
|
||||
{ projectId: projectId! },
|
||||
{ enabled: !!projectId, staleTime: 10_000 },
|
||||
{ enabled: enabled && !!projectId, staleTime: 10_000 },
|
||||
) as { data: any };
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user