Submit Product

Let your users work for you!

  • Component: <SubmitProduct/>

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

  • Import:

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

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, SignIn modal will be triggered instead.

Last updated