import LinkMasonry from "@/components/LinkViews/LinkMasonry"; import { LinkIncludingShortenedCollectionAndTags } from "@/types/global"; import { GridLoader } from "react-spinners"; import Masonry from "react-masonry-css"; import resolveConfig from "tailwindcss/resolveConfig"; import tailwindConfig from "../../../tailwind.config.js"; import { useMemo } from "react"; export default function MasonryView({ links, editMode, isLoading, }: { links: LinkIncludingShortenedCollectionAndTags[]; editMode?: boolean; isLoading?: boolean; }) { const fullConfig = resolveConfig(tailwindConfig as any); const breakpointColumnsObj = useMemo(() => { return { default: 5, 1900: 4, 1500: 3, 880: 2, 550: 1, }; }, []); return ( {links.map((e, i) => { return ( ); })} {isLoading && links.length > 0 && ( )} ); }