Skip to content

Commit

Permalink
Fix: editted the trycatch{} around the if else statement in onWeeklyC…
Browse files Browse the repository at this point in the history
…hange();
  • Loading branch information
alexappleget committed Sep 30, 2024
1 parent cf4af9e commit a7d2a11
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions app/(main)/league/[leagueId]/entry/[entryId]/week/Week.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -247,26 +247,22 @@ const Week = ({ entry, league, NFLTeams, week }: IWeekProps): JSX.Element => {
week,
};

if (lockedOut) {
try {
try {
if (lockedOut) {
toast.custom(
<Alert
variant={AlertVariants.Error}
message={`Team selection has been locked for the week!`}
/>,
);
console.error(params);
} catch (error) {
console.error('Submission error:', error);
}
} else {
try {
} else {
await onWeeklyPickChange(params);
setUserPick(teamSelect);
router.push(`/league/${league}/entry/all`);
} catch (error) {
console.error('Submission error:', error);
}
console.error(params);
} catch (error) {
console.error('Submission error:', error);
}
};

Expand Down

0 comments on commit a7d2a11

Please sign in to comment.