Fixed visual bug + grouping bug

This commit is contained in:
DrMint 2022-05-15 01:27:17 +02:00
parent 88b9fa4477
commit 16df351741
2 changed files with 5 additions and 4 deletions

View File

@ -120,7 +120,7 @@ export function PreviewCard(props: Immutable<Props>): JSX.Element {
{thumbnail && stackNumber > 0 && ( {thumbnail && stackNumber > 0 && (
<> <>
<Img <Img
className="opacity-30 rounded-t-md overflow-hidden absolute transition-[top_transform] className="opacity-30 rounded-md overflow-hidden absolute transition-[top_transform]
-top-[var(--stacked-top)*1.5rem] -top-[var(--stacked-top)*1.5rem]
scale-[calc(1-0.15*var(--stacked-top))]" scale-[calc(1-0.15*var(--stacked-top))]"
image={thumbnail} image={thumbnail}
@ -128,7 +128,7 @@ export function PreviewCard(props: Immutable<Props>): JSX.Element {
/> />
<div <div
className="bg-light rounded-t-md overflow-hidden absolute transition-[top_transform] className="bg-light rounded-md overflow-hidden absolute transition-[top_transform]
-top-[var(--stacked-top)*0.7rem] -top-[var(--stacked-top)*0.7rem]
scale-[calc(1-0.06*var(--stacked-top))]" scale-[calc(1-0.06*var(--stacked-top))]"
> >

View File

@ -242,11 +242,12 @@ function getGroups(
items.map((item) => { items.map((item) => {
const type = const type =
item.attributes?.type?.data?.attributes?.titles?.[0]?.title ?? item.attributes?.type?.data?.attributes?.titles?.[0]?.title ??
prettySlug(item.attributes?.type?.data?.attributes?.slug); item.attributes?.type?.data?.attributes?.slug
? prettySlug(item.attributes.type.data.attributes.slug)
: langui.no_type;
if (!group.has(type)) group.set(type, []); if (!group.has(type)) group.set(type, []);
group.get(type)?.push(item); group.get(type)?.push(item);
}); });
return group; return group;
} }