Fix possible to edit tournament as a non-tournament

This commit is contained in:
Kalle 2025-04-06 19:03:43 +03:00
parent 882973bbfe
commit c02cff0cf4

View File

@ -70,7 +70,9 @@ export const loader = async ({ request }: LoaderFunctionArgs) => {
return {
isAddingTournament: Boolean(
url.searchParams.has("tournament") || url.searchParams.has("copyEventId"),
url.searchParams.has("tournament") ||
url.searchParams.has("copyEventId") ||
eventToEdit?.tournament,
),
managedBadges: await BadgeRepository.findManagedByUserId(user.id),
recentEventsWithMapPools: