Skip to content

Commit

Permalink
Cleanup loading state miss
Browse files Browse the repository at this point in the history
  • Loading branch information
JustAman62 committed Aug 30, 2024
1 parent d994c27 commit b7b46f8
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions ui/src/pages/LocalPlayGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export default function LocalPlayGrid() {
return;
}
if (json) setGrid(json);
setLoading(false);
});
}, [gridId, addError, apiClient]);

Expand Down Expand Up @@ -141,7 +142,6 @@ export default function LocalPlayGrid() {
Well done! You completed the grid in <TimeDisplay totalTime={staticTime!} penalties={penalties} />, with a total of{" "}
<span className="text-red-500">{penalties ?? 0}</span> mistakes.
</span>

{!isLoggedIn && (
<span>
<a href="#" onClick={showLogin} className="mx-1 text-sky-400 hover:text-sky-600">
Expand All @@ -150,7 +150,6 @@ export default function LocalPlayGrid() {
to record this time on the leaderboard
</span>
)}

{leaderboardEntry && (
<>
<span>
Expand All @@ -160,6 +159,11 @@ export default function LocalPlayGrid() {
</span>
</>
)}
<Link to={`/grids/${gridId}/leaderboard`}>
<Button color="dark" fullSized>
View Leaderboard
</Button>
</Link>
</div>
);

Expand All @@ -177,11 +181,6 @@ export default function LocalPlayGrid() {
penalties={penalties}
/>
{staticTime && completedSection}
<Link to={`/grids/${gridId}/leaderboard`}>
<Button color="dark" fullSized>
View Leaderboard
</Button>
</Link>
</div>
</div>
</div>
Expand Down

0 comments on commit b7b46f8

Please sign in to comment.