From 72f6277c9f045a476c95a02da9b4572bece08de2 Mon Sep 17 00:00:00 2001 From: Oliver Bryan Date: Sun, 8 Feb 2026 09:16:27 +0000 Subject: [PATCH] tabs always enabled --- src/App.tsx | 353 +++++++++++++++++++++++++--------------------------- 1 file changed, 167 insertions(+), 186 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index f7680477..9980ba6b 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -48,7 +48,6 @@ export default App; function Home() { const isDevMode = import.meta.env.VITE_PUBLIC_DEV === "1"; - const isTabsEnabled = import.meta.env.VITE_TABS === "1"; const navigate = useNavigate(); const [asciiArt, setAsciiArt] = useState(""); const [activeHomeTab, setActiveHomeTab] = useState("work"); @@ -123,7 +122,7 @@ function Home() { if (event.defaultPrevented || event.isComposing) return; if (event.metaKey || event.ctrlKey || event.altKey) return; - if (isTabsEnabled && event.key === "Tab") { + if (event.key === "Tab") { event.preventDefault(); setActiveHomeTab((prev) => { const currentIndex = homeTabs.indexOf(prev); @@ -428,201 +427,183 @@ function Home() { Age: - {isTabsEnabled ? ( - setActiveHomeTab(value as HomeTab)} - className="w-full max-w-5xl gap-0" + setActiveHomeTab(value as HomeTab)} + className="w-full max-w-5xl gap-0" + > + - - - Work - - - Travel - - - -
- {visibleProjects.map((project, index) => ( - - ))} -
-
- -
- {locations.map((location, index) => ( -
- - {expandedLocationIndex === index && - (locationPhotos[location.id].length === 0 ? ( -
-
- -
-
- ) : ( -
-
- {locationPhotos[location.id].map( - (photo, photoIndex) => ( - - ), + setActivePhotoIndexByLocation((prev) => ({ + ...prev, + [location.id]: nextPhotoIndex, + })); + setPreviewPhotoPath( + getTravelPhotoPath(location, nextPhotoName), + ); + setTravelFocusLevel("photo"); + }} + variant="dummy" + size="sm" + > + {location.city}, {location.country} - {location.date} + + {expandedLocationIndex === index && + (locationPhotos[location.id].length === 0 ? ( +
+
+
- ))} -
- ))} -
- - - ) : ( -
- {visibleProjects.map((project, index) => ( - - ))} -
- )} +
+ ) : ( +
+
+ {locationPhotos[location.id].map( + (photo, photoIndex) => ( + + ), + )} +
+
+ {previewPhotoPath ? ( + {"active-photo"} + ) : ( + + + No photo selected + + )} +
+
+ ))} +
+ ))} +
+
+