diff --git a/frontend2/src/api/compete/competeKeys.ts b/frontend2/src/api/compete/competeKeys.ts index a51124c9c..30e4f7557 100644 --- a/frontend2/src/api/compete/competeKeys.ts +++ b/frontend2/src/api/compete/competeKeys.ts @@ -147,6 +147,9 @@ export const competeMutationKeys = { uploadSub: ({ episodeId }: { episodeId: string }) => ["compete", episodeId, "submit"] as const, + downloadSub: ({ episodeId }: { episodeId: string }) => + ["compete", episodeId, "submit", "download"] as const, + // --- SCRIMMAGES --- // requestScrim: ({ episodeId }: { episodeId: string }) => ["compete", episodeId, "scrimmage", "request"] as const, diff --git a/frontend2/src/api/compete/useCompete.ts b/frontend2/src/api/compete/useCompete.ts index 1ae1d3b81..5b7d2e4cd 100644 --- a/frontend2/src/api/compete/useCompete.ts +++ b/frontend2/src/api/compete/useCompete.ts @@ -543,7 +543,7 @@ export const useDownloadSubmission = ( { episodeId }: { episodeId: string }, ): UseMutationResult => useMutation({ - mutationKey: competeMutationKeys.acceptScrim({ episodeId }), + mutationKey: competeMutationKeys.downloadSub({ episodeId }), mutationFn: async ({ episodeId, id, diff --git a/frontend2/src/components/tables/submissions/SubHistoryTable.tsx b/frontend2/src/components/tables/submissions/SubHistoryTable.tsx index 5879a484a..9edf5450a 100644 --- a/frontend2/src/components/tables/submissions/SubHistoryTable.tsx +++ b/frontend2/src/components/tables/submissions/SubHistoryTable.tsx @@ -32,13 +32,11 @@ interface SubHistoryTableProps { -// TODO: should i pass episodeId down as a prop? const SubHistoryTable: React.FC = ({ data, loading, page, handlePage, - // downloadSubmission, }) => { const { episodeId } = useEpisodeId(); const downloadSubmission = useDownloadSubmission({ episodeId });