From f48b9568c192ec41d6345fb98e8320192c079ad3 Mon Sep 17 00:00:00 2001 From: Frank Date: Wed, 11 Oct 2023 22:57:46 -0600 Subject: [PATCH] Adding footer and menu API call for that, as well as adding some styling changes and additions --- src/components/common/Footer.tsx | 40 ++++++++++++++++++++++++++++ src/components/common/Internal.tsx | 9 +++++-- src/components/common/Navigation.tsx | 3 +-- src/pages/[slug].tsx | 2 +- src/pages/index.tsx | 2 +- src/pages/portfolio/index.tsx | 8 +++++- src/styles/globals.css | 13 ++++++--- 7 files changed, 67 insertions(+), 10 deletions(-) create mode 100644 src/components/common/Footer.tsx diff --git a/src/components/common/Footer.tsx b/src/components/common/Footer.tsx new file mode 100644 index 0000000..83d06db --- /dev/null +++ b/src/components/common/Footer.tsx @@ -0,0 +1,40 @@ +import React from "react"; +import { useGetMenuQuery } from "@/services/navigation"; +import Link from "next/link"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import { faLaptopCode } from "@fortawesome/free-solid-svg-icons"; + +const Footer = (props: any): JSX.Element => { + const { data: menu, isSuccess, isLoading } = useGetMenuQuery("footer-menu"); + return ( + + ); +}; + +export default Footer; diff --git a/src/components/common/Internal.tsx b/src/components/common/Internal.tsx index 7316a72..ef35ac1 100644 --- a/src/components/common/Internal.tsx +++ b/src/components/common/Internal.tsx @@ -1,15 +1,20 @@ -import clsx from "clsx"; import Navigation from "./Navigation"; +import Footer from "./Footer"; interface InternalTypes { children?: React.ReactNode; + hideFooter?: boolean; } -const Internal = ({ children }: InternalTypes): JSX.Element => { +const Internal = ({ + children, + hideFooter = false, +}: InternalTypes): JSX.Element => { return (
{children ? children : null} + {!hideFooter ?
: null}
); }; diff --git a/src/components/common/Navigation.tsx b/src/components/common/Navigation.tsx index 9710c33..34fc9c8 100644 --- a/src/components/common/Navigation.tsx +++ b/src/components/common/Navigation.tsx @@ -69,8 +69,7 @@ const Navigation = (props: any): JSX.Element => { <>
{ console.log(page); return ( -
+

{page.title.rendered}

diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 4709687..85b1fc3 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -5,7 +5,7 @@ import Internal from "@/components/common/Internal"; export default function Home(): JSX.Element { return ( - +
-
+
+

+ Portfolio +

+

Here's all my latest projects, and the technologies used!

+
+
{/* // @ts-ignore */}