diff --git a/app/features/tournament-subs/routes/to.$id.subs.new.tsx b/app/features/tournament-subs/routes/to.$id.subs.new.tsx index ae2c398ef..57f605753 100644 --- a/app/features/tournament-subs/routes/to.$id.subs.new.tsx +++ b/app/features/tournament-subs/routes/to.$id.subs.new.tsx @@ -17,7 +17,10 @@ import { TrashIcon } from "~/components/icons/Trash"; import { useUser } from "~/features/auth/core/user"; import { requireUser } from "~/features/auth/core/user.server"; import { tournamentIdFromParams } from "~/features/tournament"; -import { tournamentFromDB } from "~/features/tournament-bracket/core/Tournament.server"; +import { + clearTournamentDataCache, + tournamentFromDB, +} from "~/features/tournament-bracket/core/Tournament.server"; import type { MainWeaponId } from "~/modules/in-game-lists"; import { type SendouRouteHandle, @@ -65,6 +68,8 @@ export const action: ActionFunction = async ({ params, request }) => { userId: user.id, }); + clearTournamentDataCache(tournamentId); + throw redirect(tournamentSubsPage(tournamentId)); }; diff --git a/app/features/tournament-subs/routes/to.$id.subs.tsx b/app/features/tournament-subs/routes/to.$id.subs.tsx index 1ce0a60fc..2e837f9a5 100644 --- a/app/features/tournament-subs/routes/to.$id.subs.tsx +++ b/app/features/tournament-subs/routes/to.$id.subs.tsx @@ -18,7 +18,10 @@ import { TrashIcon } from "~/components/icons/Trash"; import { useUser } from "~/features/auth/core/user"; import { getUser, requireUser } from "~/features/auth/core/user.server"; import { tournamentIdFromParams } from "~/features/tournament"; -import { tournamentFromDB } from "~/features/tournament-bracket/core/Tournament.server"; +import { + clearTournamentDataCache, + tournamentFromDB, +} from "~/features/tournament-bracket/core/Tournament.server"; import { useTournament } from "~/features/tournament/routes/to.$id"; import { parseRequestPayload, validate } from "~/utils/remix.server"; import { assertUnreachable } from "~/utils/types"; @@ -52,6 +55,8 @@ export const action: ActionFunction = async ({ request, params }) => { userId: data.userId, }); + clearTournamentDataCache(tournamentId); + return null; };