Skip to content

Commit

Permalink
Fix nav after URL change
Browse files Browse the repository at this point in the history
  • Loading branch information
JustAman62 committed Aug 30, 2024
1 parent 4b2f4ba commit 2a4f89d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions ui/src/pages/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ export default function Home() {
Battle Mode
</span>
</NavButton>
<NavButton to="/grid/random" color="teal">
<NavButton to="/grids/random" color="teal">
<span className="flex justify-center gap-2">
<BiShuffle className="h-8" />
Play a Random Grid
</span>
</NavButton>
<NavButton to="/grid/create" color="green">
<NavButton to="/grids/create" color="green">
<span className="flex justify-center gap-2">
<LuPlus className="h-8" />
Create a Grid
Expand All @@ -49,14 +49,14 @@ export default function Home() {
<div className="flex justify-center p-2">
<div className="grow max-w-screen-md">
<h1 className="font-semibold text-2xl text-center my-2">Recent NYT Grids</h1>
<ListGrids pageSize={5} source="NYT" onGridChosen={(gridId) => navigate(`/grid/${gridId}`)} />
<ListGrids pageSize={5} source="NYT" onGridChosen={(gridId) => navigate(`/grids/${gridId}`)} />
</div>
</div>

<div className="flex justify-center p-2">
<div className="grow max-w-screen-md">
<h1 className="font-semibold text-2xl text-center my-2">Find a Grid</h1>
<SearchGrids pageSize={5} onGridChosen={(gridId) => navigate(`/grid/${gridId}`)} />
<SearchGrids pageSize={5} onGridChosen={(gridId) => navigate(`/grids/${gridId}`)} />
</div>
</div>

Expand Down Expand Up @@ -95,7 +95,7 @@ export default function Home() {
<h2 className="font-semibold text-xl mt-8 mb-2">Create your own Grid</h2>
<p>
You can{" "}
<Link className="text-sky-400 hover:text-sky-600" to="/grid/create">
<Link className="text-sky-400 hover:text-sky-600" to="/grids/create">
Create your own Grid
</Link>{" "}
and have it be played anyone in the community.
Expand Down
2 changes: 1 addition & 1 deletion ui/src/timer-battle/TimerBattleScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export default function TimerBattleScreen() {
<div className="flex grow justify-center p-2">
<div className="grow max-w-screen-md">
<h1 className="font-semibold text-2xl text-center my-2">Recent NYT Grids</h1>
<SearchGrids pageSize={5} onGridChosen={(gridId) => selectGrid(`/grid/${gridId}`)} />
<SearchGrids pageSize={5} onGridChosen={(gridId) => selectGrid(gridId)} />
</div>
</div>
</div>
Expand Down

0 comments on commit 2a4f89d

Please sign in to comment.