The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
added fade in for login state
Steven Tey7f50fb64ece7
diff --git a/components/layout/home/index.tsx b/components/layout/home/index.tsxindex d6a70a0e88..95268b46cb 100644--- a/components/layout/home/index.tsx+++ b/components/layout/home/index.tsx@@ -5,6 +5,8 @@ import { ReactNode } from "react";import { useSession } from "next-auth/react";import { Github, Logo, Twitter } from "@/components/shared/icons";import Meta from "../meta";+import { motion, AnimatePresence } from "framer-motion";+import { FADE_IN_ANIMATION_SETTINGS } from "@/lib/constants";export default function HomeLayout({children,@@ -47,21 +49,26 @@ export default function HomeLayout({</Link>)}</div>- {session ? (- <a- href="https://app.dub.sh"- className="rounded-full border border-black bg-black py-1.5 px-5 text-sm text-white transition-all hover:bg-white hover:text-black"- >- Dashboard- </a>- ) : (- <a- href="https://app.dub.sh/login"- className="rounded-full border border-black bg-black py-1.5 px-5 text-sm text-white transition-all hover:bg-white hover:text-black"- >- Sign in- </a>- )}++ <AnimatePresence>+ {session ? (+ <motion.a+ {...FADE_IN_ANIMATION_SETTINGS}+ href="https://app.dub.sh"+ className="rounded-full border border-black bg-black py-1.5 px-5 text-sm text-white transition-all hover:bg-white hover:text-black"+ >+ Dashboard+ </motion.a>+ ) : (+ <motion.a+ {...FADE_IN_ANIMATION_SETTINGS}+ href="https://app.dub.sh/login"+ className="rounded-full border border-black bg-black py-1.5 px-5 text-sm text-white transition-all hover:bg-white hover:text-black"+ >+ Sign in+ </motion.a>+ )}+ </AnimatePresence></div></div></div>