From 9242466754cd1ecbefa4fd64574dbb6ec5ef61f4 Mon Sep 17 00:00:00 2001 From: tymur999 Date: Sat, 19 Oct 2024 19:09:02 -0400 Subject: [PATCH] quick fact --- src/app/landing/journal.tsx | 51 ++++++++++++++++++++++++++++++++++ src/app/landing/page.tsx | 24 ++++++---------- src/app/landing/quick_fact.tsx | 5 ++++ src/app/landing/time.tsx | 48 ++++++++++++++++++++++++++------ src/app/layout.tsx | 2 +- src/app/page.tsx | 2 +- 6 files changed, 107 insertions(+), 25 deletions(-) create mode 100644 src/app/landing/journal.tsx create mode 100644 src/app/landing/quick_fact.tsx diff --git a/src/app/landing/journal.tsx b/src/app/landing/journal.tsx new file mode 100644 index 0000000..2798d65 --- /dev/null +++ b/src/app/landing/journal.tsx @@ -0,0 +1,51 @@ +import { motion } from "framer-motion"; +import Image from "next/image"; +import arrow from "@/img/arrow.png"; +import gradient from "@/img/gradient.png"; +import { useEffect, useState } from "react"; + +export function Journal(props: {setIndex: (index: number) => void}) { + const [loaded, setLoaded] = useState(false); + useEffect(() => { + setLoaded(true); + }, []); + + return loaded && props.setIndex(2)} + initial={{ y: 500 }} + transition={{duration: 0.2}} + animate={{ y: 0 }} + exit={{y: 500}} + className="z-[9999] bg-[#030303] absolute h-[100vh] top-0 w-full flex flex-col" + > +
Take a break for journaling
+
+ +
+
+
+ Swipe to continue +
+ arrow +
+ +
+} \ No newline at end of file diff --git a/src/app/landing/page.tsx b/src/app/landing/page.tsx index 7090f55..92e538b 100644 --- a/src/app/landing/page.tsx +++ b/src/app/landing/page.tsx @@ -6,28 +6,22 @@ import Image from "next/image"; import { useEffect, useState } from "react"; import { Time } from "@/app/landing/time"; import { motion } from "framer"; -import {useAnimate} from "framer-motion"; +import { Journal } from "@/app/landing/journal"; +import { QuickFact } from "@/app/landing/quick_fact"; -const slides = [