Allow bracket admin access for major_tournament events (CS2, Tennis)
The bracket admin loader was gating on eventType === "playoff_game", which blocked CS2 and Tennis events that correctly use "major_tournament". Also surfaces the Manage Bracket button on the event detail page for these events. https://claude.ai/code/session_01SFmJQxQZsKxvJ5rhbYk3za
This commit is contained in:
parent
dc94403160
commit
27049319b8
2 changed files with 2 additions and 2 deletions
|
|
@ -68,7 +68,7 @@ export async function loader({ params }: Route.LoaderArgs) {
|
|||
throw new Response("Event not found", { status: 404 });
|
||||
}
|
||||
|
||||
if (event.eventType !== "playoff_game") {
|
||||
if (event.eventType !== "playoff_game" && event.eventType !== "major_tournament") {
|
||||
throw new Response("This event is not a playoff event", { status: 400 });
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -232,7 +232,7 @@ export default function EventResults({
|
|||
</p>
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
{event.eventType === "playoff_game" && (
|
||||
{(event.eventType === "playoff_game" || event.eventType === "major_tournament") && (
|
||||
<Button variant="outline" asChild>
|
||||
<Link to={`/admin/sports-seasons/${sportsSeason.id}/events/${event.id}/bracket`}>
|
||||
<Brackets className="mr-2 h-4 w-4" />
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue