feat: add My Uploads listing with card and table views

This commit is contained in:
2026-06-18 21:22:44 +05:30
parent dff9e2222f
commit a18fff4d6f
28 changed files with 1060 additions and 127 deletions

View File

@@ -7,6 +7,7 @@ import { toast } from 'sonner';
import { packageService, projectService } from '@/services/api';
import type { Package, PaginationParams } from '@/types';
import { projectKeys } from '../../project/queries/projectKeys';
import { packageKeys } from '../queries/packageKeys';
interface UsePackagesQueryParams {
@@ -28,7 +29,7 @@ export function usePackagesQuery({ skip, limit }: UsePackagesQueryParams) {
export function useProjectOptionsQuery() {
return useQuery({
queryKey: ['projects', 'options'],
queryKey: projectKeys.options(),
queryFn: () => projectService.getProjects({ skip: 0, limit: 1000 }),
});
}

View File

@@ -4,6 +4,7 @@ export const packageKeys = {
all: ['packages'] as const,
lists: () => [...packageKeys.all, 'list'] as const,
list: (params: PaginationParams) => [...packageKeys.lists(), params] as const,
options: () => [...packageKeys.all, 'options'] as const,
details: () => [...packageKeys.all, 'detail'] as const,
detail: (id: string) => [...packageKeys.details(), id] as const,
};