diff --git a/web/src/app/submit/page.tsx b/web/src/app/submit/page.tsx new file mode 100644 index 00000000..9895059a --- /dev/null +++ b/web/src/app/submit/page.tsx @@ -0,0 +1,90 @@ +"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...
++ {isAuthenticated ? "Create a new icon or update an existing one" : "Sign in to submit icons"} +
+