From 122753474ac33f57574065cf6a270b0b47ce2702 Mon Sep 17 00:00:00 2001 From: Jack Merrill Date: Mon, 4 Oct 2021 18:38:50 -0500 Subject: [PATCH] fix: typeerrors --- components/Images/Logo.tsx | 2 +- components/Navbar.tsx | 23 +++++++++++------------ pages/_app.tsx | 20 +------------------- pages/index.tsx | 2 -- 4 files changed, 13 insertions(+), 34 deletions(-) diff --git a/components/Images/Logo.tsx b/components/Images/Logo.tsx index 3d1b662..e7957f1 100644 --- a/components/Images/Logo.tsx +++ b/components/Images/Logo.tsx @@ -1,4 +1,4 @@ -const Logo = (props) => ( +const Logo = (props: any) => ( diff --git a/components/Navbar.tsx b/components/Navbar.tsx index 68fef5e..c118d79 100644 --- a/components/Navbar.tsx +++ b/components/Navbar.tsx @@ -1,7 +1,6 @@ -import Link from "next/link"; -import { Fragment, useState, useEffect } from 'react' -import { Disclosure, Menu, Transition } from '@headlessui/react' -import { BellIcon, MenuIcon, XIcon } from '@heroicons/react/outline' +import { useState, useEffect } from 'react' +import { Disclosure } from '@headlessui/react' +import { MenuIcon, XIcon } from '@heroicons/react/outline' import Logo from '../components/Images/Logo'; @@ -51,20 +50,20 @@ const Navbar = ({ views }: { views: { view: string, viewing: boolean }[] }) => { {({ open }) => ( <> -
+
- +
-
+
{/* Mobile menu button */} - + Open main menu {open ? ( -
diff --git a/pages/_app.tsx b/pages/_app.tsx index e66a9a7..ec337f8 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -1,29 +1,11 @@ -import React, { useEffect, useState } from 'react' +import React from 'react' import { AppProps } from 'next/app' import SEO from '../next-seo.config'; import { DefaultSeo } from 'next-seo'; import 'tailwindcss/tailwind.css' -import { useRouter } from 'next/dist/client/router'; import Footer from '../components/Footer'; function MyApp({ Component, pageProps }: AppProps) { - const router = useRouter(); - - const [loading, setLoading] = useState(false); - - useEffect(() => { - const handleStart = () => { - setLoading(true); - } - const handleComplete = () => { - setTimeout(() => setLoading(false), 300) - } - - router.events.on('routeChangeStart', handleStart) - router.events.on('routeChangeComplete', handleComplete) - router.events.on('routeChangeError', handleComplete) - }) - return <>
diff --git a/pages/index.tsx b/pages/index.tsx index 876eb48..d90d339 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -1,8 +1,6 @@ import Link from 'next/link' import Image from 'next/image'; import { useEffect, useState, useRef } from 'react' -import CodeIcon from '../components/Images/CodeIcon' -import DesignIcon from '../components/Images/DesignIcon' import GitHubIcon from '../components/Images/GitHubIcon'; import MailIcon from '../components/Images/MailIcon'; import TwitterIcon from '../components/Images/TwitterIcon';