From 4fa8bfb7bd5f5533f1bceaca05d22e89059b9f95 Mon Sep 17 00:00:00 2001 From: John Costa Date: Wed, 7 May 2025 10:36:36 +0100 Subject: [PATCH] fix: UI for images --- frontend/src/App.tsx | 6 +++--- frontend/src/Image.tsx | 15 +++++++++++++-- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index f5b69ec..ac04e58 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -1,4 +1,4 @@ -import { Route, Router } from "@solidjs/router"; +import { Navigate, Route, Router } from "@solidjs/router"; import type { PluginListener } from "@tauri-apps/api/core"; import { listen } from "@tauri-apps/api/event"; import { readFile } from "@tauri-apps/plugin-fs"; @@ -97,7 +97,7 @@ export const App = () => { - + @@ -105,7 +105,7 @@ export const App = () => { { - return

{window.location.href}

; + return ; }} /> diff --git a/frontend/src/Image.tsx b/frontend/src/Image.tsx index ce98c45..395cc90 100644 --- a/frontend/src/Image.tsx +++ b/frontend/src/Image.tsx @@ -4,6 +4,7 @@ import { base, type UserImage } from "./network"; import { useSearchImageContext } from "./contexts/SearchImageContext"; import { SearchCard } from "./components/search-card/SearchCard"; import { IconArrowLeft } from "@tabler/icons-solidjs"; +import { useSetEntity } from "./WithEntityDialog"; export const Image: Component = () => { const { imageId } = useParams<{ imageId: string }>(); @@ -15,6 +16,8 @@ export const Image: Component = () => { ([id]) => id === imageId, )?.[1]; + const setEntity = useSetEntity(); + return (
users -
+
{(image) => ( - {(property) => } + {(property) => ( +
setEntity(property)} + onClick={() => setEntity(property)} + class="h-[144px] border relative col-span-3 border-neutral-200 cursor-pointer overflow-hidden rounded-xl" + > + +
+ )}
)}