From 4af143bccf0e803a51e89dbaf98017eff16d818a Mon Sep 17 00:00:00 2001 From: Arda Samadi Date: Wed, 17 Jun 2026 12:28:59 +0330 Subject: [PATCH] Desktop: seller dashboard shell + gate carousel arrows to product gallery - new store.$storeId.tsx layout: sticky admin sidebar (store/products/orders/ financial/shipping/threads/settings) beside content at lg; mobile unchanged - MyLayout: store/* gets a full-width desktop canvas (own sidebar), no shopper header/footer, mobile store-nav hidden at lg - store home: hide the redundant mobile store header at lg - ProductImageCarousel: prev/next arrows now opt-in (showArrows) so they only appear on the product gallery, not every masonry card --- app/components/MyLayout.tsx | 5 +- app/components/product/ProductDetailView.tsx | 1 + .../product/ProductImageCarousel.tsx | 6 +- app/routes/store.$storeId._index.tsx | 4 +- app/routes/store.$storeId.tsx | 86 +++++++++++++++++++ 5 files changed, 98 insertions(+), 4 deletions(-) create mode 100644 app/routes/store.$storeId.tsx diff --git a/app/components/MyLayout.tsx b/app/components/MyLayout.tsx index b50d91f..5c1ae0d 100644 --- a/app/components/MyLayout.tsx +++ b/app/components/MyLayout.tsx @@ -46,7 +46,10 @@ const MyLayout = React.memo(({ children }: { children: React.ReactNode }) => { // Auth pages get a full-width desktop canvas (so they can center their own // card) but no shopping header/footer. const isAuth = p === "/login" || p === "/logout"; - const expandOnDesktop = isDesktopReady || isAuth; + // Seller dashboard: full-width canvas + its own sidebar (store.$storeId.tsx), + // no shopper header/footer. + const isStore = p.startsWith("/store/"); + const expandOnDesktop = isDesktopReady || isAuth || isStore; const isThread = !!location.pathname.split("threads")[1]; return ( diff --git a/app/components/product/ProductDetailView.tsx b/app/components/product/ProductDetailView.tsx index b2fbf04..0e232d3 100644 --- a/app/components/product/ProductDetailView.tsx +++ b/app/components/product/ProductDetailView.tsx @@ -338,6 +338,7 @@ export const ProductDetailView = memo(function ProductDetailView({ borderRadius={0} isActive={productActiveStatus} controlsIsOn={true} + showArrows={true} onStatusChange={handleProductStatusChange} isChangeStatusDialogOpen={isChangeStatusDialogOpen} setIsChangeStatusDialogOpen={setIsChangeStatusDialogOpen} diff --git a/app/components/product/ProductImageCarousel.tsx b/app/components/product/ProductImageCarousel.tsx index f53972f..c3b873f 100644 --- a/app/components/product/ProductImageCarousel.tsx +++ b/app/components/product/ProductImageCarousel.tsx @@ -46,6 +46,7 @@ interface ProductImageCarouselProps { isOwner?: boolean; isActive?: boolean; controlsIsOn?: boolean; + showArrows?: boolean; onStatusChange?: (newStatus: boolean) => void; isChangeStatusDialogOpen?: boolean; setIsChangeStatusDialogOpen?: (open: boolean) => void; @@ -59,6 +60,7 @@ export const ProductImageCarousel = ({ height, borderRadius, controlsIsOn = false, + showArrows = false, isOwner = false, isActive = true, onStatusChange, @@ -276,8 +278,8 @@ export const ProductImageCarousel = ({ )} - {/* Prev / next arrows (desktop) */} - {images.length > 1 && ( + {/* Prev / next arrows (desktop, opt-in) */} + {showArrows && images.length > 1 && ( <>