fix: using image component on image page
This commit is contained in:
@ -4,9 +4,9 @@ import { A } from "@solidjs/router";
|
|||||||
|
|
||||||
export const ImageComponent: Component<{ ID: string }> = (props) => {
|
export const ImageComponent: Component<{ ID: string }> = (props) => {
|
||||||
return (
|
return (
|
||||||
<A href={`/image/${props.ID}`} class="w-full h-full max-h-[400px]">
|
<A href={`/image/${props.ID}`} class="w-full h-full">
|
||||||
<img
|
<img
|
||||||
class="w-full object-contain rounded-xl max-h-full"
|
class="w-full object-contain rounded-xl max-h-[400px]"
|
||||||
src={`${base}/image/${props.ID}`}
|
src={`${base}/image/${props.ID}`}
|
||||||
/>
|
/>
|
||||||
</A>
|
</A>
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import { ImageComponent } from "@components/image";
|
||||||
import { SearchCard } from "@components/search-card/SearchCard";
|
import { SearchCard } from "@components/search-card/SearchCard";
|
||||||
import { useSearchImageContext } from "@contexts/SearchImageContext";
|
import { useSearchImageContext } from "@contexts/SearchImageContext";
|
||||||
import { base, UserImage } from "@network/index";
|
import { base, UserImage } from "@network/index";
|
||||||
@ -14,7 +15,7 @@ export const ImagePage: Component = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<main class="flex flex-col items-center">
|
<main class="flex flex-col items-center">
|
||||||
<img class="h-1/2" alt="users" src={`${base}/image/${imageId}`} />
|
<ImageComponent ID={imageId} />
|
||||||
<div class="w-3/4 grid grid-cols-9 gap-2 grid-flow-row-dense py-4">
|
<div class="w-3/4 grid grid-cols-9 gap-2 grid-flow-row-dense py-4">
|
||||||
<Show when={imageProperties()}>
|
<Show when={imageProperties()}>
|
||||||
{(image) => (
|
{(image) => (
|
||||||
|
Reference in New Issue
Block a user