feat: adding a back button

This commit is contained in:
2025-05-05 17:18:28 +01:00
parent 23d91890f5
commit a2ba328097

View File

@ -1,8 +1,9 @@
import { useParams } from "@solidjs/router"; import { A, useParams } from "@solidjs/router";
import { For, Show, type Component } from "solid-js"; import { For, Show, type Component } from "solid-js";
import { base, type UserImage } from "./network"; import { base, type UserImage } from "./network";
import { useSearchImageContext } from "./contexts/SearchImageContext"; import { useSearchImageContext } from "./contexts/SearchImageContext";
import { SearchCard } from "./components/search-card/SearchCard"; import { SearchCard } from "./components/search-card/SearchCard";
import { IconArrowLeft } from "@tabler/icons-solidjs";
export const Image: Component = () => { export const Image: Component = () => {
const { imageId } = useParams<{ imageId: string }>(); const { imageId } = useParams<{ imageId: string }>();
@ -16,6 +17,11 @@ export const Image: Component = () => {
return ( return (
<main class="flex flex-col items-center"> <main class="flex flex-col items-center">
<nav>
<A href="/">
<IconArrowLeft />
</A>
</nav>
<img class="h-1/2" alt="users" src={`${base}/image/${imageId}`} /> <img class="h-1/2" alt="users" src={`${base}/image/${imageId}`} />
<div class="w-full grid grid-cols-9 gap-2 grid-flow-row-dense py-4"> <div class="w-full grid grid-cols-9 gap-2 grid-flow-row-dense py-4">
<Show when={imageProperties()}> <Show when={imageProperties()}>