+
+
+ {cafes.map((cafe) => (
+
+ ))}
+
+ {/* transparent overlay — captures all clicks and opens the full-page map */}
+
navigate('/map', { state: { cafes } })}
+ />
+
+ )
+}
function CitySelectorRow({
label,
@@ -205,9 +238,7 @@ function CafeCard({ cafe }: { cafe: Cafe }) {
}
export default function Home() {
- // نقشه/لیست toggle — disabled for now, the map view isn't part of the app yet
- // (will be added in a later version); uncomment together with its JSX below
- // const [view, setView] = useState<'list' | 'map'>('list')
+ const [view, setView] = useState<'list' | 'map'>('list')
const [cities, setCities] = useState
([])
const [selectedCityUuid, setSelectedCityUuid] = useState('')
const [selectedMatchUuid, setSelectedMatchUuid] = useState('')
@@ -252,7 +283,6 @@ export default function Home() {
کافهها
- {/* نقشه/لیست toggle — commented out together with the `view` state above, see that comment
- */}
-
- {/* always the list view for now — restore the `view === 'list' ? ... :
` ternary when the map toggle above is restored */}
-
- {cafes.map((cafe) => (
-
- ))}
+ {view === 'map' ? (
+
+ ) : (
+
+
+ {cafes.map((cafe) => (
+
+ ))}
+
-
+ )}