"use client"; import { useEffect, useState } from "react"; import { Skeleton } from "@/components/ui/skeleton"; const tips = [ { title: "Responses update while you work", description: "Open form results can refresh automatically when a new response arrives.", }, { title: "Closed forms keep their history", description: "Closing a form stops new responses without removing its existing results.", }, { title: "Platform counts can be refreshed", description: "Use Backend when a YouTube, TikTok, Discord, or Roblox count looks stale.", }, { title: "Preview before sharing", description: "Every form editor includes a preview of what respondents will see.", }, ] as const; export function AdminWelcome() { const [tipIndex, setTipIndex] = useState(null); useEffect(() => { const frame = requestAnimationFrame(() => { setTipIndex(Math.floor(Math.random() * tips.length)); }); return () => cancelAnimationFrame(frame); }, []); const tip = tipIndex === null ? null : tips[tipIndex]; return (

Welcome back!

{tip ? (

{tip.title}

{tip.description}

) : (
)}
); }