DirectoryFast
  • 🚀Get Started
  • 🔤Tutorials
    • Bring me to life!
    • How it's structured?
    • Make it yours
    • Bonus
  • 🛠️Features
    • AI
      • AI URL Scanner & Scan Jobs
    • Analytics
    • Authentication
    • API
      • Protected Endpoints
    • Blog
    • Database
    • Emails
    • Error Pages
    • Icons
    • Payments
    • Private Pages
    • SEO
  • 📦General Components
    • Shadcn/ui Components
    • Navbar
    • Footer
    • SignIn Modal
    • Hero Section
    • Social Proof
    • Collections Social Proof
    • Featured Section
    • Latest Collections Section
    • Latest Products Section
    • Recommended Section
  • 📦Directory Components
    • Product Card
    • Collection Card
    • Product Note
    • Search Bar
    • Tags
    • Product Options Toggle
    • Combobox
    • Multi-Combobox
    • Submit Product
    • Feature Product
    • Manage Note
    • Manage Collection
    • Dashboard Tables
  • ⛓️Links
    • GitHub Repository
    • Support
Powered by GitBook
On this page
  1. Directory Components

Submit Product

Let your users work for you!

PreviousMulti-ComboboxNextFeature Product

Last updated 9 months ago

  • Component: <SubmitProduct/>

  • Path: /components/shared/submit-product.tsx

  • Import:

import { SubmitProduct } from "@/components/shared/submit-product";

Users can suggest/submit products with this simple modal. No dedicated page so it does not disturb their navigation too much.

Most fields are optional to not discourage people.

Do not forget to fill ADMIN_EMAIL in .env file as anonymous suggestions will be connected to your account.

If you need your users to be logged in to submit, uncomment this code in components/shared/submit-book.tsx :

submit-book.tsx
// if (session.status === "unauthenticated") {
  //   return (
  //     <>
  //       <SignInModal />
  //       <Button variant="ghost" onClick={() => setShowSignInModal(true)}>
  //         <PlusIcon className="mr-2 h-4 w-4" />
  //         Suggest a book
  //       </Button>
  //     </>
  //   );
  // }
  // if (session.status === "authenticated") {

As a result, modal will be triggered instead.

📦
SignIn
Submit Product Modal