diff --git a/src/App.tsx b/src/App.tsx index e4f711fd..cceb936a 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -43,6 +43,7 @@ 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 [activeTab, setActiveTab] = useState("work"); @@ -87,7 +88,7 @@ function Home() { if (event.defaultPrevented || event.isComposing) return; if (event.metaKey || event.ctrlKey || event.altKey) return; - if (event.key === "Tab") { + if (isTabsEnabled && event.key === "Tab") { event.preventDefault(); setActiveTab((prev) => { const currentIndex = homeTabs.indexOf(prev); @@ -197,42 +198,56 @@ function Home() { Age: - setActiveTab(value as HomeTab)} - className="w-full max-w-5xl gap-0" - > - - - Work - - - Travel - - -
- -
- {visibleProjects.map((project, index) => ( - - ))} -
-
- test + {isTabsEnabled ? ( + setActiveTab(value as HomeTab)} + className="w-full max-w-5xl gap-0" + > + + + Work + + + Travel + + +
+ +
+ {visibleProjects.map((project, index) => ( + + ))} +
+
+ +
+
+ ) : ( +
+ {visibleProjects.map((project, index) => ( + + ))}
- + )}