From 8296df08f8274b2119047cab473a53dc1c08fe79 Mon Sep 17 00:00:00 2001 From: Paul Cretu Date: Mon, 31 Jan 2022 23:54:07 -0600 Subject: [PATCH] Clean up imports (#37) - Remove unused - Group `mui/material` --- src/components/Footer.jsx | 8 +------- src/components/Nav.jsx | 24 +++++++++++++----------- src/pages/_app.jsx | 1 - src/pages/_document.jsx | 1 - src/pages/learn.jsx | 1 - 5 files changed, 14 insertions(+), 21 deletions(-) diff --git a/src/components/Footer.jsx b/src/components/Footer.jsx index 6a2b0fc..a69dffb 100644 --- a/src/components/Footer.jsx +++ b/src/components/Footer.jsx @@ -4,14 +4,8 @@ import LinkedInIcon from '@mui/icons-material/LinkedIn' import NotificationsIcon from '@mui/icons-material/Notifications' import TwitterIcon from '@mui/icons-material/Twitter' import YouTubeIcon from '@mui/icons-material/YouTube' -import { styled } from '@mui/material' -import AppBar from '@mui/material/AppBar' -import Box from '@mui/material/Box' -import Button from '@mui/material/Button' -import Toolbar from '@mui/material/Toolbar' -import Typography from '@mui/material/Typography' +import { AppBar, Box, Button, styled, Toolbar, Typography } from '@mui/material' import Link from 'next/link' -import * as React from 'react' import useCheckMobileScreen from '../utils/useCheckMobileScreen' diff --git a/src/components/Nav.jsx b/src/components/Nav.jsx index 976d806..1b195d7 100644 --- a/src/components/Nav.jsx +++ b/src/components/Nav.jsx @@ -1,17 +1,19 @@ import MenuIcon from '@mui/icons-material/Menu' import NotificationsIcon from '@mui/icons-material/Notifications' -import AppBar from '@mui/material/AppBar' -import Box from '@mui/material/Box' -import Button from '@mui/material/Button' -import Container from '@mui/material/Container' -import IconButton from '@mui/material/IconButton' -import Menu from '@mui/material/Menu' -import MenuItem from '@mui/material/MenuItem' -import Toolbar from '@mui/material/Toolbar' -import Typography from '@mui/material/Typography' +import { + AppBar, + Box, + Button, + Container, + IconButton, + Menu, + MenuItem, + Toolbar, + Typography, +} from '@mui/material' import Image from 'next/image' import Link from 'next/link' -import * as React from 'react' +import { useState } from 'react' import orcasoundlogo from '../../public/images/orcasoundlogo.png' @@ -39,7 +41,7 @@ const navLinks = [ ] const Nav = () => { - const [anchorElNav, setAnchorElNav] = React.useState(null) + const [anchorElNav, setAnchorElNav] = useState(null) const handleOpenNavMenu = (event) => { setAnchorElNav(event.currentTarget) diff --git a/src/pages/_app.jsx b/src/pages/_app.jsx index 4d9e09c..ac5ec1c 100644 --- a/src/pages/_app.jsx +++ b/src/pages/_app.jsx @@ -5,7 +5,6 @@ import { CacheProvider } from '@emotion/react' import CssBaseline from '@mui/material/CssBaseline' import { ThemeProvider } from '@mui/material/styles' import Head from 'next/head' -import React from 'react' import Layout from '../components/Layout' import theme from '../styles/theme' diff --git a/src/pages/_document.jsx b/src/pages/_document.jsx index 077145c..d4bcf90 100644 --- a/src/pages/_document.jsx +++ b/src/pages/_document.jsx @@ -1,6 +1,5 @@ import createEmotionServer from '@emotion/server/create-instance' import Document, { Head, Html, Main, NextScript } from 'next/document' -import * as React from 'react' import theme from '../styles/theme' import createEmotionCache from '../utils/createEmotionCache' diff --git a/src/pages/learn.jsx b/src/pages/learn.jsx index c0e30d9..6292733 100644 --- a/src/pages/learn.jsx +++ b/src/pages/learn.jsx @@ -1,6 +1,5 @@ import Head from 'next/head' import Image from 'next/image' -import Link from 'next/link' import ReactAudioPlayer from 'react-audio-player' import audio from '../../public/audio/frequency.mp3'