Skip to content

Commit

Permalink
Fix button + links usage
Browse files Browse the repository at this point in the history
  • Loading branch information
delasy committed Oct 23, 2024
1 parent 12b8e4e commit d702aa5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
6 changes: 3 additions & 3 deletions app/play/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,9 @@ export default function PlayPage() {
<GameMap map={map.grid} size={52} />
</CardContent>
<CardFooter className="flex justify-around px-3">
<Link href={`/play/${map.level}`} passHref>
<Button>Play</Button>
</Link>
<Button asChild>
<Link href={`/play/${map.level}`}>Play</Link>
</Button>

<Authenticated>
<div className="flex flex-col items-center gap-y-2">
Expand Down
6 changes: 3 additions & 3 deletions app/prompts/[promptId]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ export default function EditPromptPage({
<h1 className="mb-4 font-semibold">Edit your prompt</h1>
<div className="flex space-x-4">
<Button variant="default">Save</Button>
<Link href="/prompts" passHref>
<Button variant="default">Return</Button>
</Link>
<Button asChild variant="default">
<Link href="/prompts">Return</Link>
</Button>
</div>
</div>
<div className="flex h-screen min-h-screen flex-col items-start space-y-4">
Expand Down
15 changes: 8 additions & 7 deletions app/prompts/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,14 @@ export default function PromptsPage() {
>
Activate
</Button>
<Link
href={`/prompts/${row._id}`}
className="flex items-center"
passHref
>
<Button variant="secondary">Edit</Button>
</Link>
<Button asChild variant="secondary">
<Link
className="flex items-center"
href={`/prompts/${row._id}`}
>
Edit
</Link>
</Button>
<Button
variant="destructive"
onClick={async () => {
Expand Down

0 comments on commit d702aa5

Please sign in to comment.