Skip to content

Commit

Permalink
fix nits!
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolexxuu committed Jul 16, 2024
1 parent abdcb61 commit 0206b90
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 3 additions & 0 deletions frontend2/src/api/compete/competeKeys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion frontend2/src/api/compete/useCompete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ export const useDownloadSubmission = (
{ episodeId }: { episodeId: string },
): UseMutationResult<void, Error, CompeteSubmissionDownloadRetrieveRequest, unknown> =>
useMutation({
mutationKey: competeMutationKeys.acceptScrim({ episodeId }),
mutationKey: competeMutationKeys.downloadSub({ episodeId }),
mutationFn: async ({
episodeId,
id,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,11 @@ interface SubHistoryTableProps {



// TODO: should i pass episodeId down as a prop?
const SubHistoryTable: React.FC<SubHistoryTableProps> = ({
data,
loading,
page,
handlePage,
// downloadSubmission,
}) => {
const { episodeId } = useEpisodeId();
const downloadSubmission = useDownloadSubmission({ episodeId });
Expand Down

0 comments on commit 0206b90

Please sign in to comment.