diff --git a/frontend/src/components/SwipeableCard.tsx b/frontend/src/components/SwipeableCard.tsx index 83b7caf..b16cd38 100644 --- a/frontend/src/components/SwipeableCard.tsx +++ b/frontend/src/components/SwipeableCard.tsx @@ -21,15 +21,22 @@ function SwipeableCard({ content, onSwiped }: SwipeableCardProps) { onSwipedUp: () => handleSwipe("up"), onSwipedDown: () => handleSwipe("down"), onSwiping: (eventData) => handleSwiping(eventData), + onTap: (eventData) => handleTapping(eventData), }); const handleSwipe = (dir: string) => { - setWatermark(null); - setIsFlipped(true); - setTimeout(() => { + if(dir === "up" ) { + setWatermark(null); + setIsFlipped(true); + } else { + setWatermark(null); onSwiped(dir); - setIsFlipped(false); - }, 600); // Match the duration of the CSS transition + } + }; + + const handleTapping = ({ dir }: { dir: string }) => { + setIsFlipped(false); + console.log(dir); }; const handleSwiping = ({ dir }: { dir: string }) => { diff --git a/frontend/src/pages/Error404.tsx b/frontend/src/pages/Error404.tsx index 8e1d1ca..00194e9 100644 --- a/frontend/src/pages/Error404.tsx +++ b/frontend/src/pages/Error404.tsx @@ -3,12 +3,15 @@ import { Link } from "react-router-dom"; const Error404 = () => { return ( -
Sorry, the page you are looking for does not exist.
- + Go to Home