feat: quiz
This commit is contained in:
@@ -12,6 +12,7 @@ import { useEffect, useState } from "react";
|
||||
import Link from "next/link";
|
||||
import { ChevronRight } from "lucide-react";
|
||||
import { getVaniOfTheDay, type Vani } from "@/lib/vani";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
/** Quote-marks glyph (svgrepo). Inherits color via `currentColor`. */
|
||||
function QuotesIcon({ className }: { className?: string }) {
|
||||
@@ -28,7 +29,7 @@ function QuotesIcon({ className }: { className?: string }) {
|
||||
);
|
||||
}
|
||||
|
||||
export function VaniOfTheDayCTA() {
|
||||
export function VaniOfTheDayCTA({ className }: { className?: string } = {}) {
|
||||
const [vani, setVani] = useState<Vani | null>(null);
|
||||
|
||||
useEffect(() => {
|
||||
@@ -57,11 +58,11 @@ export function VaniOfTheDayCTA() {
|
||||
return (
|
||||
<Link
|
||||
href={vani.href}
|
||||
className="group flex w-full max-w-md items-center gap-3.5 rounded-2xl border border-border bg-card p-4 text-left transition-colors hover:border-primary/40 hover:bg-muted/40"
|
||||
className={cn(
|
||||
"group flex w-full max-w-md items-center gap-3.5 rounded-2xl border border-border bg-card p-4 text-left transition-colors hover:border-primary/40 hover:bg-muted/40",
|
||||
className,
|
||||
)}
|
||||
>
|
||||
<span className="inline-flex size-12 shrink-0 items-center justify-center rounded-full bg-primary/10 text-primary">
|
||||
<QuotesIcon className="size-6" />
|
||||
</span>
|
||||
<div className="min-w-0 flex-1">
|
||||
<p className="text-xs font-medium text-primary">Vani of the day</p>
|
||||
<p className="mt-0.5 truncate text-base font-semibold text-foreground leading-snug">
|
||||
|
||||
Reference in New Issue
Block a user