From 253198b9f98074943aa6a144d41d0385d468bd2f Mon Sep 17 00:00:00 2001 From: qt-coder Date: Mon, 28 Jun 2021 12:19:32 +0800 Subject: [PATCH] Added hero component and landing page --- components/Hero/Hero.js | 105 ++++++++++++++++++++++++++++++++++++++++ pages/index.js | 3 +- 2 files changed, 107 insertions(+), 1 deletion(-) create mode 100644 components/Hero/Hero.js diff --git a/components/Hero/Hero.js b/components/Hero/Hero.js new file mode 100644 index 0000000..a44bcfc --- /dev/null +++ b/components/Hero/Hero.js @@ -0,0 +1,105 @@ +import React from "react" +import Link from 'next/link' +import PropTypes from "prop-types" +import { + Box, + Button, + Flex, + Image, + Heading, + Stack, + Text, +} from "@chakra-ui/react" +import AuthButton from '../AuthButton' +import { signIn } from "next-auth/client" + +export default function Hero({ + title, + subtitle, + image, + ctaLink, + ctaText, + ...rest +}) { + return ( + + + + {title} + + + {subtitle} + + + + + + No credit card required. + + + + + + + ) +} + +Hero.propTypes = { + title: PropTypes.string, + subtitle: PropTypes.string, + image: PropTypes.string, + ctaText: PropTypes.string, + ctaLink: PropTypes.string, +} + +Hero.defaultProps = { + title: "Hero", + subtitle: + "This is the subheader section where you describe the basic benefits of your product", + image: "https://source.unsplash.com/collection/404339/800x600", + ctaText: "Create your account now", + ctaLink: "", +} diff --git a/pages/index.js b/pages/index.js index 41314e0..a33f3b8 100644 --- a/pages/index.js +++ b/pages/index.js @@ -1,6 +1,7 @@ import Card from '../components/Card' import { useSession } from 'next-auth/client' import { Text } from "@chakra-ui/react" +import Hero from '../components/Hero/Hero' export default function Home() { @@ -10,7 +11,7 @@ export default function Home() { <> {!session && <> -

Seems like you're not logged in. Log in to get started!

+ } {session && <>