mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-10-01 15:48:23 -05:00
No LFG tab/prompt if tournament is invitational
This commit is contained in:
@@ -828,6 +828,7 @@ export class Tournament {
|
||||
/** Can a new sub post be made at this time? */
|
||||
get canAddNewSubPost() {
|
||||
if (!this.lfgEnabled) return false;
|
||||
if (this.isInvitational) return false;
|
||||
if (this.ctx.isFinalized) return false;
|
||||
|
||||
return (
|
||||
|
||||
@@ -29,6 +29,10 @@ export const loader = async ({ params }: LoaderFunctionArgs) => {
|
||||
throw new Response(null, { status: 404 });
|
||||
}
|
||||
|
||||
if (tournament.isInvitational) {
|
||||
throw new Response(null, { status: 404 });
|
||||
}
|
||||
|
||||
if (tournament.isLeagueSignup && !tournament.registrationOpen) {
|
||||
throw new Response(null, { status: 404 });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user