improved UX + improved performance

This commit is contained in:
daniel31x13
2024-03-10 06:08:28 -04:00
parent 3feeecdc1d
commit 4a0e75c6e5
18 changed files with 135 additions and 57 deletions
+13 -2
View File
@@ -1,14 +1,16 @@
import LinkCard from "@/components/LinkViews/LinkCard";
import { LinkIncludingShortenedCollectionAndTags } from "@/types/global";
import { link } from "fs";
import { GridLoader } from "react-spinners";
export default function CardView({
links,
showCheckbox = true,
editMode,
isLoading,
}: {
links: LinkIncludingShortenedCollectionAndTags[];
showCheckbox?: boolean;
editMode?: boolean;
isLoading?: boolean;
}) {
return (
<div className="grid min-[1900px]:grid-cols-4 xl:grid-cols-3 sm:grid-cols-2 grid-cols-1 gap-5">
@@ -23,6 +25,15 @@ export default function CardView({
/>
);
})}
{isLoading && links.length > 0 && (
<GridLoader
color="oklch(var(--p))"
loading={true}
size={20}
className="fixed top-5 right-5 opacity-50 z-30"
/>
)}
</div>
);
}