PioneerSquareLabs / otto-playground

A playground where Otto can run free while hopefully not accidentally reformatting your hard drive
https://otto-playground.vercel.app
13 stars 0 forks source link

Create page => src/pages/index.tsx #726

Open otto-jacob opened 1 year ago

otto-jacob commented 1 year ago

Create a Next.js page for src/pages/index.tsx. Here are the instructions:

Issue: Create Next.js React index.tsx page

Description

In this task, you are required to create a Next.js React page named index.tsx which will serve as the main landing page of our application. A main landing page that describes Otto in detail and explains how it works, with a hero image (with a CTA to sign up), video demos, features, testimonials, and a sign up form at the bottom.

The page should be a functional component using ES6 syntax like arrow functions. You will be using Next.js, TypeScript, next-auth/react for authentication, Tailwind CSS for styling, and Prisma for fetching data from the database via API endpoints.

Requirements

  1. Create a new file named index.tsx inside the src/pages directory.
  2. Import the necessary dependencies at the top of the file:
    • import Head from 'next/head';
    • import { NextPage } from 'next';
    • Any other necessary imports from the ~ (src) directory, such as components or utility functions.
  3. Create a functional component named IndexPage using the arrow function syntax.
    • Add a Head section with the title and favicon
    • Render the page content using Tailwind CSS classes for styling. Do not import any CSS files directly or use custom CSS classes.
    • Generate detailed and engaging copy and placeholder images. Use a beautiful, clean, modern design. Here is a description of the page content: A main landing page that describes Otto in detail and explains how it works, with a hero image (with a CTA to sign up), video demos, features, testimonials, and a sign up form at the bottom.
    • Manage user interactions, such as button clicks or form submissions, using appropriate event handlers and state updates.
  4. Export the IndexPage component as the default export.

Please ensure that the created React component matches the given page description, properly manages its state and lifecycle, renders correctly, and supports the necessary user interactions. When importing files, use ~ for the root directory (src) as specified in the tsconfig paths configuration.

If you have any questions or need further clarification, please don't hesitate to ask. Good luck!