"use client" import { useEffect, useState } from "react" import { AdvancedIconSubmissionForm } from "@/components/advanced-icon-submission-form" import { LoginModal } from "@/components/login-modal" import { Button } from "@/components/ui/button" import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card" import { pb } from "@/lib/pb" export default function SubmitPage() { const [isAuthenticated, setIsAuthenticated] = useState(false) const [isLoading, setIsLoading] = useState(true) const [showLoginModal, setShowLoginModal] = useState(false) useEffect(() => { const checkAuth = () => { setIsAuthenticated(pb.authStore.isValid) setIsLoading(false) } checkAuth() // Subscribe to auth changes pb.authStore.onChange(() => { checkAuth() }) }, []) if (isLoading) { return (

Loading...

) } if (!isAuthenticated) { return ( <>
Submit an Icon Share your icons with the community and help expand our collection

Before you start

  • You need to be logged in to submit icons
  • Icons should be in SVG, PNG, or WebP format
  • Maximum file size: 5MB per variant
  • All submissions are reviewed before being added to the collection
) } return (

Submit an Icon

{isAuthenticated ? "Create a new icon or update an existing one" : "Sign in to submit icons"}

) }