diff --git a/app/components/MondrianProductList.tsx b/app/components/MondrianProductList.tsx index 7a76660..58b87c5 100644 --- a/app/components/MondrianProductList.tsx +++ b/app/components/MondrianProductList.tsx @@ -96,8 +96,17 @@ const MondrianProductList = ({ const oddHeight = useMemo(() => [220, 260, 320, 200, 280], []); const evenHeight = useMemo(() => [280, 200, 260, 220, 320], []); + + // Desktop masonry: distribute products across 4 columns (round-robin). + const desktopColumns = useMemo(() => { + const cols: MondrianList[][] = [[], [], [], []]; + products.forEach((p, i) => cols[i % 4].push(p)); + return cols; + }, [products]); + const desktopHeights = useMemo(() => [300, 360, 260, 340, 280, 320], []); + return ( -
+
{!isCommonList ? ( <> {isLoading ? ( @@ -113,7 +122,8 @@ const MondrianProductList = ({ /> ) : ( <> -
+ {/* Mobile / tablet: original two-column masonry (unchanged) */} +
{/* Column 1 (Odd products - index 0, 2, ...) */}
{oddProducts.map((product, index: number) => { @@ -146,6 +156,26 @@ const MondrianProductList = ({ })}
+ + {/* Desktop: 4-column masonry */} +
+ {desktopColumns.map((col, ci) => ( +
+ {col.map((product, index) => ( + + ))} +
+ ))} +
+ {hasNextPage && } )} diff --git a/app/components/MyLayout.tsx b/app/components/MyLayout.tsx index 51de242..852131a 100644 --- a/app/components/MyLayout.tsx +++ b/app/components/MyLayout.tsx @@ -27,10 +27,12 @@ import productsOutline from "~/assets/icons/navbar/products-outline.svg"; */ const MyLayout = React.memo(({ children }: { children: React.ReactNode }) => { const location = useLocation(); - // Desktop chrome is rolled out per-page. Only routes listed here get the + // Desktop chrome is rolled out per-page. Only routes matched here get the // full-width desktop layout; everything else keeps the current (mobile) // experience at all widths so nothing regresses while we build the rest. - const isDesktopReady = location.pathname === "/"; + const p = location.pathname; + const isDesktopReady = + p === "/" || p.startsWith("/search/") || p === "/cart"; const isThread = !!location.pathname.split("threads")[1]; return ( diff --git a/app/routes/cart._index.tsx b/app/routes/cart._index.tsx index 2737fc8..ffeaf69 100644 --- a/app/routes/cart._index.tsx +++ b/app/routes/cart._index.tsx @@ -59,11 +59,16 @@ export default function CartIndex() { }; return (
- {/* Header */} - + {/* Header (mobile) */} +
+ +
{/* Cart Content */} -
+
+

+ سبد خرید +

-
+
{carts.map((cart) => { return (
- onSearch(searchValue, navigate)} - /> +
+
+ onSearch(searchValue, navigate)} + /> +
+ + {/* Desktop results heading */} +
+ +

+ نتایج برای «{query}» +

+
+