From d2d4ee58138201e9f6c2b8533e4b2afbec9ff0aa Mon Sep 17 00:00:00 2001 From: 3zachm <3zachm2@gmail.com> Date: Sat, 10 Dec 2022 02:54:00 -0800 Subject: [PATCH] head metadata and team init --- layouts/HomeLayout.tsx | 17 +++++-- layouts/NavTemplates.tsx | 3 +- pages/about.tsx | 11 +++-- pages/contact.tsx | 11 +++-- pages/index.tsx | 96 ++++++++++++++++++++++------------------ pages/team.tsx | 23 ++++++++++ 6 files changed, 107 insertions(+), 54 deletions(-) create mode 100644 pages/team.tsx diff --git a/layouts/HomeLayout.tsx b/layouts/HomeLayout.tsx index 129586d..8d87cff 100644 --- a/layouts/HomeLayout.tsx +++ b/layouts/HomeLayout.tsx @@ -20,16 +20,27 @@ function HomeLayout(props: HomeLayoutProps) { <> InvestBot - + + + + + + + + - + + - + -

+

{label}

@@ -42,6 +42,7 @@ interface NavTemplate { const homeMain: NavTemplate[] = [ { content: }, { content: }, + { content: }, { content: }, ]; diff --git a/pages/about.tsx b/pages/about.tsx index e42f884..31ac4db 100644 --- a/pages/about.tsx +++ b/pages/about.tsx @@ -5,9 +5,14 @@ import { homeMain } from "../layouts/NavTemplates"; function About() { return ( -
-

about

-
+ <> + + About - InvestBot + +
+

about

+
+ ); } diff --git a/pages/contact.tsx b/pages/contact.tsx index 407bd17..1440cf4 100644 --- a/pages/contact.tsx +++ b/pages/contact.tsx @@ -5,9 +5,14 @@ import { homeMain } from "../layouts/NavTemplates"; function About() { return ( -
-

contact

-
+ <> + + Contact - InvestBot + +
+

contact

+
+ ); } diff --git a/pages/index.tsx b/pages/index.tsx index 28a0349..94389f8 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -4,11 +4,13 @@ import HomeLayout from "../layouts/HomeLayout"; import { homeMain } from "../layouts/NavTemplates"; import type { NextPageWithLayout } from "./_app"; import Image from "next/image"; +import Head from "next/head"; const Home: NextPageWithLayout = () => { let api7tvEmotes = `/api/7tv/emotes?c=61ad997effa9aba101bcfddf`; const [emotesUrls, setEmotes] = useState([]); const [currentEmote, setCurrentEmote] = useState(0); + useEffect(() => { fetch(api7tvEmotes) .then((res) => res.json()) @@ -40,6 +42,7 @@ const Home: NextPageWithLayout = () => { // eslint-disable-next-line react-hooks/exhaustive-deps }, []); + // change emote every 5 seconds, separated from the fetch call so it only initializes once when the emotes are loaded useEffect(() => { const interval = setInterval(() => { // choose a random emote @@ -72,55 +75,60 @@ const Home: NextPageWithLayout = () => { } return ( -
-
- + <> + + Home - InvestBot + +
+
- Buy high - Sell low + + Buy high + Sell low + + + ...or something like that + - - ...or something like that - - - - {slideShow} - + {slideShow} + +
-
+ ); }; diff --git a/pages/team.tsx b/pages/team.tsx new file mode 100644 index 0000000..686ad63 --- /dev/null +++ b/pages/team.tsx @@ -0,0 +1,23 @@ +import Head from "next/head"; +import { ReactElement } from "react"; +import HomeLayout from "../layouts/HomeLayout"; +import { homeMain } from "../layouts/NavTemplates"; + +function Team() { + return ( + <> + + Team - InvestBot + +
+

Team

+
+ + ); +} + +Team.getLayout = function getLayout(page: ReactElement) { + return {page}; +}; + +export default Team;