fix: key error
This commit is contained in:
parent
b068cf1def
commit
e06787fb3f
@ -1,5 +1,6 @@
|
||||
import StyledLink from "@/components/gallery/StyledLink";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { Fragment } from "react/jsx-runtime";
|
||||
|
||||
export function DescItem({ name, children, className }: {
|
||||
name: string;
|
||||
@ -21,10 +22,10 @@ export function DescTagItem({
|
||||
return <DescItem name={name} className={className}>
|
||||
{items.length === 0 ? "N/A" : items.map(
|
||||
(x, i) =>
|
||||
<>
|
||||
<StyledLink key={x} to={`/search?allow_tag=${name.toLowerCase()}:${x}`}>{x}</StyledLink>
|
||||
<Fragment key={x}>
|
||||
<StyledLink to={`/search?allow_tag=${name.toLowerCase()}:${x}`}>{x}</StyledLink>
|
||||
{i + 1 < items.length && <span className="">, </span>}
|
||||
</>
|
||||
</Fragment>
|
||||
)}
|
||||
</DescItem>;
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ export default function Gallery() {
|
||||
|
||||
|
||||
const isLoadingMore = data && size > 0 && (data[size - 1] === undefined);
|
||||
return (<div className="p-4 grid gap-2 items-start content-start" ref={parentRef}>
|
||||
return (<div className="p-4 grid gap-2 overflow-auto h-dvh items-start content-start" ref={parentRef}>
|
||||
<Search />
|
||||
{(word || tags) &&
|
||||
<div className="bg-primary rounded-full p-1 sticky top-0 shadow-md z-10">
|
||||
|
Loading…
Reference in New Issue
Block a user