From 4008a5e2a1b0fd08df42c161d69df384667b47a9 Mon Sep 17 00:00:00 2001 From: Tyler Yu Date: Wed, 9 Oct 2024 02:27:44 -0700 Subject: [PATCH] feat: animations --- packages/web/src/components/Home/Home.jsx | 842 +++++++++++----------- 1 file changed, 437 insertions(+), 405 deletions(-) diff --git a/packages/web/src/components/Home/Home.jsx b/packages/web/src/components/Home/Home.jsx index c0b55e3..a230027 100644 --- a/packages/web/src/components/Home/Home.jsx +++ b/packages/web/src/components/Home/Home.jsx @@ -65,6 +65,7 @@ import ListItemButton from "./ListItemButton"; import FeedbackButtonMobile from "./FeedbackButtonMobile"; import { MdAssignment } from "react-icons/md"; +import { motion } from "framer-motion"; export default function Home() { const { colorMode, toggleColorMode } = useColorMode(); @@ -341,449 +342,480 @@ export default function Home() { background={colorMode === "dark" ? "#2F363C" : ""} > {/* LOGO + TEXT */} - + + + {/* SEARCH BAR */} - {/* size={{ base: "md", md: "lg" }} */} - - - - - setSearch(e.target.value)} - /> - + + {/* size={{ base: "md", md: "lg" }} */} + + + + + setSearch(e.target.value)} + /> + + - - - - {user ? ( - <> - - - + {colorMode === "light" ? : } + + + {user ? ( + <> + - {user - ? leaderboard.find((u) => u.email === user.email)?.points - : 0} - - - - - - - {/* User Emblem Dropdown */} - - - logoutbutton - {user?.email} - - { - setFindFilter((prev) => ({ - ...prev, - isYourPosts: !prev.isYourPosts, - })); - onOpen(); - }} + + {user + ? leaderboard.find((u) => u.email === user.email) + ?.points + : 0} + + + + logoutbutton - Your Posts - - - - {subscription ? ( - <> - Unsubscribe from newsletter button - Unsubscribe - - ) : ( - <> - Subscribe from newsletter button - Subscribe - - )} - - - - logoutbutton - Logout - - - - - ) : ( - - )} - - - + + + {/* User Emblem Dropdown */} + + + logoutbutton + {user?.email} + + { + setFindFilter((prev) => ({ + ...prev, + isYourPosts: !prev.isYourPosts, + })); + onOpen(); + }} + > + logoutbutton + Your Posts + + + + {subscription ? ( + <> + Unsubscribe from newsletter button + Unsubscribe + + ) : ( + <> + Subscribe from newsletter button + Subscribe + + )} + + + + logoutbutton + Logout + + + + + ) : ( + + )} + + + + - + {/* Mobile Search */} - - - - - - - setSearch(e.target.value)} - /> - + + + + + + + setSearch(e.target.value)} + /> + + - + - - {isEdit ? ( - - - - - Click on the Map to place your item 📍 - - - - ) : ( - - + + {isEdit ? ( + + + + + Click on the Map to place your item 📍 + + + + ) : ( + + + + + + + + - - - - - - - - - - - - {isFilterOff() ? ( - All Posts - ) : ( - - - Filter: ON - - - - )} - - - - - - - setSearch(e.target.value)} - /> - - - + + + + + + {isFilterOff() ? ( + All Posts + ) : ( + + + Filter: ON + + + + )} + + + + + + + setSearch(e.target.value)} + /> + + + + + + + + + + + + )} + - - - - - - - - )} - - - - + background={colorMode === "dark" ? "#1A1E22" : ""} + > + + + + + + - - - - - - + top={0} + right={5} + display={{ base: "none", md: "flex" }} + background={colorMode === "dark" ? "#1A1E22" : ""} + > + + + + + - - - - + {!loading && (