From 1f760e0c65fe01c02ca57d7501aabd7da135c4c5 Mon Sep 17 00:00:00 2001 From: Maddox Date: Tue, 7 Apr 2026 18:26:08 -0400 Subject: [PATCH] Mobile always uses card view, table only on desktop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On mobile (< sm breakpoint) cards are always rendered regardless of the view toggle. The toggle is already hidden on mobile — this makes the rendering match. Co-Authored-By: Claude Sonnet 4.6 --- src/App.tsx | 51 +++++++++++++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 22 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 90fbd0a..d6084a5 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -179,31 +179,38 @@ export default function App() {
Loading…
- ) : view === 'grid' ? ( -
- {stores.length === 0 ? ( -
- No stores found. Try adjusting your filters. -
- ) : ( - stores.map(s => ( - + No stores found. Try adjusting your filters. +
+ ) : ( + <> + {/* Mobile: always cards */} +
+ {stores.map(s => ( + + ))} +
+ + {/* Desktop: toggle between table and grid */} +
+ {view === 'grid' ? ( +
+ {stores.map(s => ( + + ))} +
+ ) : ( + - )) - )} -
- ) : ( - + )} + + )} {pagination && (