From e06297b7390330aa2275fdf468fa6f6f710d4627 Mon Sep 17 00:00:00 2001 From: jackson Date: Tue, 30 Jul 2024 09:40:01 +0100 Subject: [PATCH] removing hook --- src/components/SiteFrame/Header.tsx | 51 +++-------------------------- 1 file changed, 5 insertions(+), 46 deletions(-) diff --git a/src/components/SiteFrame/Header.tsx b/src/components/SiteFrame/Header.tsx index 5ac4ae5..3537a6d 100644 --- a/src/components/SiteFrame/Header.tsx +++ b/src/components/SiteFrame/Header.tsx @@ -1,15 +1,9 @@ import React, {createRef, useEffect, useState, useContext} from "react"; import { Box, CssBaseline, Button, IconButton, Drawer as MuiDrawer, Typography, Grid, useMediaQuery, CircularProgress, Backdrop, BoxProps, Menu, MenuItem, LinearProgress, IconButtonProps, BackdropProps, SelectChangeEvent, Link, ButtonProps } from "@mui/material"; import MuiAppBar, { AppBarProps as MuiAppBarProps } from '@mui/material/AppBar'; -import { ThemeProvider } from '@mui/material/styles'; -import MenuIcon from "@mui/icons-material/Menu"; -import NotificationsIcon from '@mui/icons-material/Notifications'; -import ArrowUpwardIcon from '@mui/icons-material/ArrowUpward'; -import HelpIcon from '@mui/icons-material/Help'; import { Theme } from "@mui/material"; import { styled } from '@mui/material/styles'; import { Crest } from "./Crest"; -import { getAirportByCode } from "../../aiports"; import ManageAccountsIcon from '@mui/icons-material/ManageAccounts'; import ArticleIcon from '@mui/icons-material/Article'; @@ -20,42 +14,9 @@ import EqualizerIcon from '@mui/icons-material/Equalizer'; import ArrowDropDownIcon from '@mui/icons-material/ArrowDropDown'; import PortSelector from "../PortSelector"; -import PortPanel from "../PortSelector/PortPanel"; -import {createDRTTheme} from "../../drt-theme"; -import UserMenu from "./UserMenu"; - -export interface ISiteFrame {} - const drawerWidth: number = 240; -const ColorModeContext = React.createContext({ toggleColorMode: () => {} }); - -const Wrapper = styled(Box)(({ theme }) => ({ - display: 'flex', - flexDirection: 'column', - height: '100%', - alignItems: 'flex-start', - overflow: 'hidden', -})); -const ScrollToTopBtn = styled(IconButton)(({ theme }) => ({ - backgroundColor: theme.palette.primary.main, - color: theme.palette.common.white, - width: '40px', - height: '40px', - '&:hover': { - backgroundColor: theme.palette.primary.dark, - color: theme.palette.common.white, - } -})); - -const PageContent = styled(Box)(({ theme }) => ({ - display: 'flex', - height: '100%', - flexGrow: 1, - backgroundColor: theme.palette.mode === 'light' ? theme.palette.grey[100] : 'transparent', - alignItems: 'stretch', -})); const NavButton = styled(Button)(({ theme }) => ({ color: '#000', @@ -87,9 +48,7 @@ const AppBar = styled(MuiAppBar, { })); -export const Header = ({}: ISiteFrame) => { - const isMobile = useMediaQuery((theme: Theme) => theme.breakpoints.down('sm')); - +export const Header = ({}) => { const [anchorEl, setAnchorEl] = React.useState(null); const open = Boolean(anchorEl); const handleClick = (event: React.MouseEvent) => { @@ -103,7 +62,7 @@ export const Header = ({}: ISiteFrame) => { - { - + Contact: drtpoiseteam@homeoffice.gov.uk - +