feat: project without submission (#8530)
This commit is contained in:
1 parent
05db236a3c
commit
d36af2d3fa
10 files changed
+364
-65
No files matched your search
@@ -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}`,
|
||||
{},
|
||||
);
|
||||
},
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user