fix: typeerrors

This commit is contained in:
Jack Merrill 2021-10-04 18:38:50 -05:00
parent 3afea9b415
commit 122753474a
4 changed files with 13 additions and 34 deletions

View File

@ -1,4 +1,4 @@
const Logo = (props) => ( const Logo = (props: any) => (
<svg width="100%" height="100%" viewBox="0 0 1080 1080" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlnsXlink="http://www.w3.org/1999/xlink" xmlSpace="preserve" fillRule="evenodd" clipRule="evenodd" strokeLinejoin="round" strokeMiterlimit="2" {...props}> <svg width="100%" height="100%" viewBox="0 0 1080 1080" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlnsXlink="http://www.w3.org/1999/xlink" xmlSpace="preserve" fillRule="evenodd" clipRule="evenodd" strokeLinejoin="round" strokeMiterlimit="2" {...props}>
<g> <g>
<g transform="matrix(2.37095,0,0,2.37095,-437.8,-886.233)"> <g transform="matrix(2.37095,0,0,2.37095,-437.8,-886.233)">

View File

@ -1,7 +1,6 @@
import Link from "next/link"; import { useState, useEffect } from 'react'
import { Fragment, useState, useEffect } from 'react' import { Disclosure } from '@headlessui/react'
import { Disclosure, Menu, Transition } from '@headlessui/react' import { MenuIcon, XIcon } from '@heroicons/react/outline'
import { BellIcon, MenuIcon, XIcon } from '@heroicons/react/outline'
import Logo from '../components/Images/Logo'; import Logo from '../components/Images/Logo';
@ -51,20 +50,20 @@ const Navbar = ({ views }: { views: { view: string, viewing: boolean }[] }) => {
<Disclosure as="nav" className={`fixed w-full z-50 bg-black border-b-2 border-white ${atTop ? '' : 'shadow-lg'}`}> <Disclosure as="nav" className={`fixed w-full z-50 bg-black border-b-2 border-white ${atTop ? '' : 'shadow-lg'}`}>
{({ open }) => ( {({ open }) => (
<> <>
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"> <div className="px-4 mx-auto max-w-7xl sm:px-6 lg:px-8">
<div className="flex items-center justify-between h-16"> <div className="flex items-center justify-between h-16">
<div className="flex items-center"> <div className="flex items-center">
<div className="flex-shrink-0"> <div className="flex-shrink-0">
<Logo className="h-8 w-8" /> <Logo className="w-8 h-8" />
</div> </div>
<div className="hidden md:block"> <div className="hidden md:block">
<div className="ml-10 flex items-baseline space-x-4"> <div className="flex items-baseline ml-10 space-x-4">
{navigation.map((item) => ( {navigation.map((item) => (
<a <a
key={item.name} key={item.name}
href={item.href} href={item.href}
id={item.name + item.href} id={item.name + item.href}
onClick={(e) => { onClick={() => {
updateCurrent() updateCurrent()
}} }}
className={classNames( className={classNames(
@ -81,14 +80,14 @@ const Navbar = ({ views }: { views: { view: string, viewing: boolean }[] }) => {
</div> </div>
</div> </div>
</div> </div>
<div className="-mr-2 flex md:hidden"> <div className="flex -mr-2 md:hidden">
{/* Mobile menu button */} {/* Mobile menu button */}
<Disclosure.Button className="bg-gray-800 inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-white hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-800 focus:ring-white"> <Disclosure.Button className="inline-flex items-center justify-center p-2 text-gray-400 bg-gray-800 rounded-md hover:text-white hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-800 focus:ring-white">
<span className="sr-only">Open main menu</span> <span className="sr-only">Open main menu</span>
{open ? ( {open ? (
<XIcon className="block h-6 w-6" aria-hidden="true" /> <XIcon className="block w-6 h-6" aria-hidden="true" />
) : ( ) : (
<MenuIcon className="block h-6 w-6" aria-hidden="true" /> <MenuIcon className="block w-6 h-6" aria-hidden="true" />
)} )}
</Disclosure.Button> </Disclosure.Button>
</div> </div>

View File

@ -1,29 +1,11 @@
import React, { useEffect, useState } from 'react' import React from 'react'
import { AppProps } from 'next/app' import { AppProps } from 'next/app'
import SEO from '../next-seo.config'; import SEO from '../next-seo.config';
import { DefaultSeo } from 'next-seo'; import { DefaultSeo } from 'next-seo';
import 'tailwindcss/tailwind.css' import 'tailwindcss/tailwind.css'
import { useRouter } from 'next/dist/client/router';
import Footer from '../components/Footer'; import Footer from '../components/Footer';
function MyApp({ Component, pageProps }: AppProps) { 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 <> return <>
<div id='app'> <div id='app'>
<main className="w-full h-full min-h-screen bg-black"> <main className="w-full h-full min-h-screen bg-black">

View File

@ -1,8 +1,6 @@
import Link from 'next/link' import Link from 'next/link'
import Image from 'next/image'; import Image from 'next/image';
import { useEffect, useState, useRef } from 'react' 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 GitHubIcon from '../components/Images/GitHubIcon';
import MailIcon from '../components/Images/MailIcon'; import MailIcon from '../components/Images/MailIcon';
import TwitterIcon from '../components/Images/TwitterIcon'; import TwitterIcon from '../components/Images/TwitterIcon';