diff --git a/src/App.tsx b/src/App.tsx index cceb936a..ff11e88e 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -2,6 +2,8 @@ import { Downasaur, Github, Home as HomeIcon, + Image, + ImageDelete, Mail, Notes, } from "@nsmr/pixelart-react"; @@ -12,7 +14,11 @@ import { ProjectListItem } from "@/components/ProjectListItem"; import { TimeSince } from "@/components/time-since"; import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; import { type ProjectEntry, projectList, projects } from "@/projects"; +import { locations, locationPhotos } from "@/travel"; +import { TravelListItem } from "./components/TravelListItem"; import { ThemeToggle } from "./components/theme-toggle"; +import { Button } from "./components/ui/button"; +import { cn } from "./lib/utils"; const asciiFiles = [ "cat-sleep.txt", @@ -48,6 +54,8 @@ function Home() { const [asciiArt, setAsciiArt] = useState(""); const [activeTab, setActiveTab] = useState("work"); const [activeIndex, setActiveIndex] = useState(null); + const [activeLocation, setActiveLocation] = useState(null); + const [activePhoto, setActivePhoto] = useState(null); const [hasPointerInteraction, setHasPointerInteraction] = useState(false); const [asciiFile] = useState( () => asciiFiles[Math.floor(Math.random() * asciiFiles.length)], @@ -204,7 +212,10 @@ function Home() { onValueChange={(value) => setActiveTab(value as HomeTab)} className="w-full max-w-5xl gap-0" > - + -
- -
- {visibleProjects.map((project, index) => ( - +
+ {visibleProjects.map((project, index) => ( + + ))} +
+ + +
+ {locations.map((location, index) => ( + <> + { + setActivePhoto(null); + setActiveLocation((prev) => + prev === index ? null : index, + ); + }} /> - ))} -
-
- -
+ {activeLocation === index && + (locationPhotos[location.id].length === 0 ? ( +
+
+ +
+
+ ) : ( +
+
+ {locationPhotos[location.id].map((photo) => ( + + ))} +
+ {activePhoto ? ( + {"active-photo"} + ) : ( +
+ + No photo selected +
+ )} +
+ ))} + + ))} +
+ ) : (