export const REACTION_EMOJIS = ["❤️", "🤩", "🎉", "🔥"] export const COMMUNITY_FILTER_OPTIONS = [ { label: "Most Liked", value: "likes", icon: "lucide:heart", iconColor: "text-red-500" }, { label: "New", value: "new", icon: "lucide:zap", iconColor: "text-yellow-500" } ]; export const MODELS_FILTER_OPTIONS = [ { label: "Most Liked", value: "likes", icon: "lucide:heart", iconColor: "text-red-500" }, { label: "Hotest", value: "hotest", icon: "ph:fire-bold", iconColor: "text-orange-500" }, ]; export const SIDEBAR_MENUS = [ { icon: "uim:cube", label: "Models", href: "/", }, { icon: "solar:gallery-bold-duotone", label: "Gallery", href: "/gallery", }, { icon: "fluent:glance-horizontal-sparkles-16-filled", label: "Generate", href: "/generate", }] export const tokenIsAvailable = async (token: string) => { const userRequest = await fetch("https://huggingface.co/oauth/userinfo", { method: "GET", headers: { Authorization: `Bearer ${token}`, }, }) const user = await userRequest.clone().json().catch(() => ({})); return user?.sub ? user : null; }