From a19954b4f2208551908ecea51565618869836cc8 Mon Sep 17 00:00:00 2001 From: Oscar <83197788+Wosca@users.noreply.github.com> Date: Fri, 10 May 2024 20:29:53 +1000 Subject: [PATCH] UI Improvements Added correct alt text on home page, and made powered by upstash link to the upstash site. --- www/src/app/page.tsx | 254 ++++++++++++++++++------------------ www/src/components/Demo.tsx | 86 ++++++------ www/src/lib/redis.ts | 4 +- 3 files changed, 177 insertions(+), 167 deletions(-) diff --git a/www/src/app/page.tsx b/www/src/app/page.tsx index 1eddfe5..7106e70 100644 --- a/www/src/app/page.tsx +++ b/www/src/app/page.tsx @@ -1,37 +1,38 @@ -import CodeSection from '@/components/CodeSection' -import Demo from '@/components/Demo' -import { Icons } from '@/components/Icons' -import YoutubePlayer from '@/components/YoutubePlayer' -import { redis } from '@/lib/redis' -import { cn } from '@/lib/utils' -import { Check, Star } from 'lucide-react' -import localFont from 'next/font/local' +import CodeSection from "@/components/CodeSection"; +import Demo from "@/components/Demo"; +import { Icons } from "@/components/Icons"; +import YoutubePlayer from "@/components/YoutubePlayer"; +import { redis } from "@/lib/redis"; +import { cn } from "@/lib/utils"; +import { Check, Star } from "lucide-react"; +import localFont from "next/font/local"; const fontScary = localFont({ - src: '../assets/Scary.ttf', -}) + src: "../assets/Scary.ttf", +}); export default async function Home() { - const requests = await redis.get('served-requests') + const requests = await redis.get("served-requests"); return ( -
@@ -39,118 +40,121 @@ export default async function Home() {
API
- Detecting toxic content has always been{' '} +
+ Detecting toxic content has always been{" "} + )} + > slow - {' '} - and{' '} + {" "} + and{" "} + )} + > expensive . Not anymore. Introducing a fast, free and open-source profanity filter for your web apps.
-
-
+
+
{(Math.ceil(Number(requests) / 10) * 10).toLocaleString()}
- {' '}
- API requests served{' '}
+
+
- guy from my discord (i forgot who 💀)
@@ -158,59 +162,59 @@ export default async function Home() { -
-
+
+
Moderating profanity is a thankless job.
- {' '}
+
+
Profanity on your website...
-
+
...scares away new visitors
-+
Imagine your ideal customer waddling through a minefield of four-letter words to find your amazing product. Not exactly a recipe for conversion is it??
...makes you look bad
-+
...makes you look bad
+Your sweet grandma wants to see what her sunshine is doing on the internet and stumbles upon your website. Do you really - need her to put on a{' '} - + need her to put on a{" "} + hazmat suit - {' '} + {" "} first?
-
+
+
F@#k moderating content manually!
- {' '}
+
Make an API request
-Make an API request
+https://vector.profanity.dev
+ +https://vector.profanity.dev
+
{successData.score > 0.95 ? ( - 🚨🚨😱😱 OH GOD, VERY BIG PROFANITY DETECTED!! 🚨🚨😱😱{' '} + 🚨🚨😱😱 OH GOD, VERY BIG PROFANITY DETECTED!! 🚨🚨😱😱{" "} ) : successData.score > 0.9 ? ( 🚨😱 BIG PROFANITY DETECTED!! 🚨😱 @@ -74,27 +75,30 @@ const Demo = () => { ) : null}
-+
score (higher is worse): {successData.score.toFixed(3)}
Results will be shown here
+Results will be shown here
)}- Error: {error.message} +
+ Error: {error.message}
) : null}