mirror of
https://github.com/supabase/supabase.git
synced 2026-10-06 18:05:11 +03:00
* init * Infinite scrolling pagination for projects in table view * Infinite scrolling pagination for projects in cards view * Shift searching projects to URL state + to server side * Shift status filter to URL state * opt to use local storage query for view moe * update wildcard project route * add created at value, and shift filter status to server side * Nit * final nit * Address comments * Fix * Prettier * Raise page limit to 96
37 lines
1.7 KiB
TypeScript
37 lines
1.7 KiB
TypeScript
export const projectKeys = {
|
|
list: () => ['all-projects'] as const,
|
|
infiniteListByOrg: (
|
|
slug: string | undefined,
|
|
params: {
|
|
limit: number
|
|
sort?: 'name_asc' | 'name_desc' | 'created_asc' | 'created_desc'
|
|
search?: string
|
|
statuses?: string[]
|
|
}
|
|
) => ['all-projects', slug, params] as const,
|
|
status: (projectRef: string | undefined) => ['project', projectRef, 'status'] as const,
|
|
types: (projectRef: string | undefined) => ['project', projectRef, 'types'] as const,
|
|
detail: (projectRef: string | undefined) => ['project', projectRef, 'detail'] as const,
|
|
serviceVersions: (projectRef: string | undefined) =>
|
|
['project', projectRef, 'service-versions'] as const,
|
|
readonlyStatusList: () => ['projects', 'readonly-statuses'] as const,
|
|
readonlyStatus: (projectRef: string | undefined) =>
|
|
['projects', projectRef, 'readonly-status'] as const,
|
|
projectTransfer: (projectRef: string | undefined, targetOrganizationSlug: string | undefined) =>
|
|
['projects', 'transfer', projectRef, targetOrganizationSlug] as const,
|
|
projectTransferPreview: (
|
|
projectRef: string | undefined,
|
|
targetOrganizationSlug: string | undefined
|
|
) => ['projects', 'transfer', projectRef, targetOrganizationSlug, 'preview'] as const,
|
|
pauseStatus: (projectRef: string | undefined) =>
|
|
['projects', projectRef, 'pause-status'] as const,
|
|
|
|
orgProjects: (slug: string | undefined) => ['projects', 'org', slug] as const,
|
|
|
|
// Clone to new project
|
|
listCloneBackups: (projectRef: string | undefined) =>
|
|
['projects', projectRef, 'clone-backups'] as const,
|
|
listCloneStatus: (projectRef: string | undefined) =>
|
|
['projects', projectRef, 'clone-status'] as const,
|
|
}
|