diff --git a/src/pages/MyTeam.page.tsx b/src/pages/MyTeam.page.tsx index 01706e14..4aeedd8f 100644 --- a/src/pages/MyTeam.page.tsx +++ b/src/pages/MyTeam.page.tsx @@ -78,7 +78,7 @@ export const MyTeamPage = () => { setIsLoading(true); const res = await z.string().min(1).safeParseAsync(teamName); - if (res.success) { + if (res.success && isBefore(new Date(), teamEditCloseDate)) { // try to create the new team try { const res = await createTeam(teamName);