feat: project without submission (#8530)

This commit is contained in:
Arik Chakma authored and GitHub committed 2025-04-22 11:36:36 +01:00
1 parent 05db236a3c
commit d36af2d3fa
10 files changed
+364 -65

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
import { queryOptions } from '@tanstack/react-query';
import { httpGet } from '../lib/query-http';
import { isLoggedIn } from '../lib/jwt';
type ProjectStatusResponse = {
id?: string;
startedAt?: Date;
submittedAt?: Date;
repositoryUrl?: string;
upvotes: number;
downvotes: number;
};
export function projectStatusOptions(projectId: string) {
return queryOptions({
queryKey: ['project-status', projectId],
queryFn: () => {
return httpGet<ProjectStatusResponse>(
`${import.meta.env.PUBLIC_API_URL}/v1-project-status/${projectId}`,
{},
);
},
});
}