diff --git a/components/LinkViews/Layouts/MasonryView.tsx b/components/LinkViews/Layouts/MasonryView.tsx index 743dcd4..1caca9f 100644 --- a/components/LinkViews/Layouts/MasonryView.tsx +++ b/components/LinkViews/Layouts/MasonryView.tsx @@ -2,6 +2,9 @@ import LinkCard from "@/components/LinkViews/LinkCard"; 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, @@ -12,11 +15,23 @@ export default function MasonryView({ editMode?: boolean; isLoading?: boolean; }) { + const fullConfig = resolveConfig(tailwindConfig as any); + + const breakpointColumnsObj = useMemo(() => { + return { + default: 4, + 1900: 3, + [fullConfig.theme.screens.xl]: 2, + [fullConfig.theme.screens.sm]: 1, + }; + }, []); + return ( {links.map((e, i) => { return ( diff --git a/components/MobileNavigation.tsx b/components/MobileNavigation.tsx index 02fa08a..e5cbbf7 100644 --- a/components/MobileNavigation.tsx +++ b/components/MobileNavigation.tsx @@ -1,4 +1,4 @@ -import { dropdownTriggerer, isIphone } from "@/lib/client/utils"; +import { dropdownTriggerer, isIphone, isPWA } from "@/lib/client/utils"; import React from "react"; import { useState } from "react"; import NewLinkModal from "./ModalContent/NewLinkModal"; @@ -20,7 +20,7 @@ export default function MobileNavigation({}: Props) { >