Bob AI: Add a glassmorphic badge containing a random funny fact abou

This commit is contained in:
2026-04-20 23:25:17 +03:00
parent da1cd492d5
commit b5f98f04df
3 changed files with 60 additions and 10 deletions

View File

@@ -0,0 +1,22 @@
"use client";
import { useState, useEffect } from "react";
import { getRandomFact } from "@/utils/facts";
export default function GlassmorphicBadge() {
const [fact, setFact] = useState<string>("");
useEffect(() => {
setFact(getRandomFact());
}, []);
if (!fact) return null;
return (
<div className="absolute bottom-4 right-4 z-20 max-w-[250px] p-3 rounded-[var(--radius)] shadow-lg text-xs
bg-card/50 backdrop-blur-md border border-foreground/10 text-foreground">
<p className="font-bold mb-1">Fun Fact!</p>
<p>{fact}</p>
</div>
);
}