link back to where you left off

This commit is contained in:
Corwin 2024-04-29 00:30:52 +01:00
parent 917d7b3d5a
commit c14b4dfc35
No known key found for this signature in database
2 changed files with 5 additions and 2 deletions

View file

@ -54,7 +54,7 @@ function Display({ game }: { game: ShowcaseGame }) {
<>
<ContentBlock color="#AAAFFF">
<BackToShowcaseWrapper>
<Link href="../showcase">
<Link href={`../showcase#${slugify(game.name)}`}>
<strong>&lt;</strong> Back to showcase
</Link>
</BackToShowcaseWrapper>

View file

@ -28,7 +28,10 @@ export default function ColourPickerPage() {
function Game({ game }: { game: ShowcaseGame }) {
const showcaseImage = game.screenshots[game.screenshots.length - 1];
return (
<GameDisplay href={`./showcase/${slugify(game.name)}`}>
<GameDisplay
href={`./showcase/${slugify(game.name)}`}
id={slugify(game.name)}
>
<GameImage src={showcaseImage} alt={`Screenshot of ${game.name}`} />
<h2>{game.name}</h2>
</GameDisplay>