Skip to content

Commit

Permalink
feat: remove stats
Browse files Browse the repository at this point in the history
  • Loading branch information
cecelot committed Oct 19, 2024
1 parent 7ec0408 commit b3f52af
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
6 changes: 0 additions & 6 deletions client/src/components/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@ export default function Navbar() {
<Link href="/about" className="hover:text-pink transition-all">
{"["}About{"]"}
</Link>
<Link
href="/stats"
className="text-mauve hover:text-pink transition-all"
>
{"["}Stats{"]"}
</Link>
<Link
href={!isLoading && authenticated ? "/account" : "/login"}
className="text-mauve hover:text-pink transition-all"
Expand Down
9 changes: 4 additions & 5 deletions client/src/lib/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ export function handleReady(context: Context<ReadyEvent>) {
export function handleGameAbort(context: Context<GameAbortEvent>) {
if (!context.aborted) {
context.setAborted(true);
toast.success(
"Game aborted (the game will be deleted and no stats will be changed). Redirecting to home page...",
{ duration: 5000 },
);
toast.success("Game aborted. Redirecting to home page...", {
duration: 5000,
});
setTimeout(() => {
window.location.href = "/";
}, 5000);
Expand All @@ -35,7 +34,7 @@ export function handleGameEnd(context: Context<GameEndEvent>) {
if (!context.aborted) {
context.setAborted(true);
toast.success(
`${ev.d.winner} won the game with a score of ${ev.d.points} / ${ev.d.total}! Access this board again any time from the Stats page.`,
`${ev.d.winner} won the game with a score of ${ev.d.points} / ${ev.d.total}!`,
{ duration: 10_000 },
);
}
Expand Down

0 comments on commit b3f52af

Please sign in to comment.