From a9333dc90f56ae4e19fabff4822ac1ffba7c6205 Mon Sep 17 00:00:00 2001 From: Michael Hunteman Date: Thu, 7 Mar 2024 16:14:25 -0800 Subject: Remove unneeded MUI components --- src/components/Admin.tsx | 11 ++--- src/components/Desktop.tsx | 6 +-- src/components/Mobile.tsx | 12 +---- src/components/NavBar.tsx | 2 +- src/components/Registry.tsx | 10 ++-- src/components/RsvpForm.tsx | 101 +++++++++++++++++++-------------------- src/components/Schedule.tsx | 40 ++-------------- src/features/auth/GuestLogin.tsx | 18 +++---- 8 files changed, 73 insertions(+), 127 deletions(-) (limited to 'src') diff --git a/src/components/Admin.tsx b/src/components/Admin.tsx index 11fbc22..bd1545d 100644 --- a/src/components/Admin.tsx +++ b/src/components/Admin.tsx @@ -1,4 +1,3 @@ -import { Paper, Typography } from '@mui/material'; import { useGetGuestsQuery } from '../apiSlice'; function Admin() { @@ -13,7 +12,7 @@ function Admin() { let content; if (isLoading) { - content = Loading... + content =

Loading...

} else if (isSuccess) { content = JSON.stringify(guests); } else if (isError) { @@ -21,12 +20,10 @@ function Admin() { } return ( - - - Admin - + <> +

Admin

{content} -
+ ); } diff --git a/src/components/Desktop.tsx b/src/components/Desktop.tsx index 35ddc5e..34a0621 100644 --- a/src/components/Desktop.tsx +++ b/src/components/Desktop.tsx @@ -1,6 +1,6 @@ import { useContext } from 'react'; import { Link } from "react-router-dom"; -import { Stack, Button, IconButton } from "@mui/material"; +import { Button, IconButton } from "@mui/material"; import DarkModeIcon from '@mui/icons-material/DarkMode'; import LightModeIcon from '@mui/icons-material/LightMode'; import { useTheme } from '@mui/material/styles'; @@ -12,7 +12,7 @@ function Desktop() { const { toggleColorMode } = useContext(ThemeContext); return ( - +
{pages.map(page => (
); } diff --git a/src/components/Mobile.tsx b/src/components/Mobile.tsx index 6c95295..f2ca255 100644 --- a/src/components/Mobile.tsx +++ b/src/components/Mobile.tsx @@ -27,18 +27,10 @@ function Mobile() { {theme.palette.mode === 'dark' ? : } - + - + {pages.map((page) => ( - + diff --git a/src/components/Schedule.tsx b/src/components/Schedule.tsx index 73548bc..64e4d1a 100644 --- a/src/components/Schedule.tsx +++ b/src/components/Schedule.tsx @@ -1,42 +1,8 @@ -import { Paper, Typography } from '@mui/material'; -import { - Timeline, - TimelineConnector, - TimelineContent, - TimelineDot, - TimelineItem, - TimelineOppositeContent, - TimelineSeparator -} from '@mui/lab'; - function Schedule() { return ( - - - Location and attire - - - - - 4:00 pm - - - - - - Ceremony - - - - 5:00 pm - - - - - Reception - - - + <> +

Location and attire

+ ); } diff --git a/src/features/auth/GuestLogin.tsx b/src/features/auth/GuestLogin.tsx index c3b3b96..11f3d5b 100644 --- a/src/features/auth/GuestLogin.tsx +++ b/src/features/auth/GuestLogin.tsx @@ -1,6 +1,6 @@ import { useNavigate } from 'react-router-dom'; import { useDispatch } from 'react-redux'; -import { Box, Button, Container, TextField, Typography } from '@mui/material'; +import { Button, Container, TextField, Typography } from '@mui/material'; import { useForm } from 'react-hook-form'; import { setCredentials } from './authSlice'; import { useLoginMutation, LoginRequest } from '../../apiSlice'; @@ -28,11 +28,11 @@ function GuestLogin() { return ( - Guest Login @@ -45,7 +45,7 @@ function GuestLogin() { error={!!errors.firstName} helperText={errors.firstName?.message} required - {...register("firstName", { required: "This field is required" })} + {...register('firstName', { required: 'This field is required' })} /> - + ); } -- cgit v1.2.3