The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
added toast to feedback
Steven Teyddb146683fd0
diff --git a/app/ui/home/testimonials.tsx b/app/ui/home/testimonials.tsxindex c102c5f8bb..8cf8ade519 100644--- a/app/ui/home/testimonials.tsx+++ b/app/ui/home/testimonials.tsx@@ -5,10 +5,14 @@ import MaxWidthWrapper from "@/components/shared/max-width-wrapper";import Tweet from "#/ui/tweet";export default async function Testimonials() {- const userCount = conn- ? // await prisma.user.count()- (await conn.execute("SELECT COUNT(id) FROM User")).rows[0]["count(id)"]- : 5000;+ let userCount = 6000;+ try {+ if (conn) {+ userCount = (await conn.execute("SELECT COUNT(id) FROM User")).rows[0][+ "count(id)"+ ];+ }+ } catch (_) {}const tweets = await getTweetsMetadata(homepageTweets);diff --git a/app/ui/stats/feedback.tsx b/app/ui/stats/feedback.tsxindex 3cac5f95db..e5d8cb0fcb 100644--- a/app/ui/stats/feedback.tsx+++ b/app/ui/stats/feedback.tsx@@ -3,6 +3,7 @@ import { AnimatePresence, motion } from "framer-motion";import { LoadingDots } from "#/ui/icons";import { CheckCircle } from "lucide-react";import { useDebouncedCallback } from "use-debounce";+import { toast } from "sonner";export default function Feedback() {const [data, setData] = useState({@@ -22,6 +23,7 @@ export default function Feedback() {.then((res) => res.json()).then(() => {setState("submitted");+ toast.success("Succesfully submitted feedback!");});};@@ -61,10 +63,7 @@ export default function Feedback() {initial={{ opacity: 0, y: 10 }}animate={{ opacity: 1, y: 0 }}>- <CheckCircle- fill="currentColor"- className="h-10 w-10 text-green-500"- />+ <CheckCircle className="h-8 w-8 text-green-500" /><p className="text-gray-500">Thank you for your feedback!</p></motion.div>) : (diff --git a/components/stats/feedback.tsx b/components/stats/feedback.tsxindex 3a02d89275..06342c15d4 100644--- a/components/stats/feedback.tsx+++ b/components/stats/feedback.tsx@@ -2,8 +2,9 @@ import { useState } from "react";import { AnimatePresence, motion } from "framer-motion";import { useSession } from "next-auth/react";import { LoadingDots } from "#/ui/icons";-import { CheckCircleFill } from "../shared/icons";import { useDebouncedCallback } from "use-debounce";+import { CheckCircle } from "lucide-react";+import { toast } from "sonner";export default function Feedback() {const { data: session } = useSession();@@ -24,6 +25,7 @@ export default function Feedback() {.then((res) => res.json()).then(() => {setState("submitted");+ toast.success("Succesfully submitted feedback!");});};@@ -63,7 +65,7 @@ export default function Feedback() {initial={{ opacity: 0, y: 10 }}animate={{ opacity: 1, y: 0 }}>- <CheckCircleFill className="h-10 w-10 text-green-500" />+ <CheckCircle className="h-10 w-10 text-green-500" /><p className="text-gray-500">Thank you for your feedback!</p></motion.div>) : (