summaryrefslogtreecommitdiff
path: root/src/components/Rsvp.tsx
diff options
context:
space:
mode:
authorMichael Hunteman <michael@huntm.net>2024-05-17 15:20:30 -0700
committerMichael Hunteman <michael@huntm.net>2024-05-17 15:20:30 -0700
commit7103019890960e793deefb64987a09b33be60b42 (patch)
treec1c9402aa250c68b2cbe13d62598232bbf20b1e2 /src/components/Rsvp.tsx
parentfc5c111bcfe296bec82e1cf9fdb88fc80fb24f89 (diff)
Add golang server
Diffstat (limited to 'src/components/Rsvp.tsx')
-rw-r--r--src/components/Rsvp.tsx29
1 files changed, 0 insertions, 29 deletions
diff --git a/src/components/Rsvp.tsx b/src/components/Rsvp.tsx
deleted file mode 100644
index dad7213..0000000
--- a/src/components/Rsvp.tsx
+++ /dev/null
@@ -1,29 +0,0 @@
-import React from 'react';
-import { useMemo } from 'react';
-import { useLocation, Navigate, Outlet } from 'react-router-dom';
-import { useSelector } from 'react-redux';
-import CssBaseline from '@mui/material/CssBaseline';
-import NavBar from './NavBar';
-import { selectCurrentGuest } from '../features/auth/authSlice';
-
-const authenticate = () => {
- const guest = useSelector(selectCurrentGuest);
- return useMemo(() => ({ guest }), [guest]);
-};
-
-function Rsvp() {
- const auth = authenticate();
- const location = useLocation();
-
- return auth?.guest ? (
- <>
- <CssBaseline />
- <NavBar />
- <Outlet context={auth?.guest} />
- </>
- ) : (
- <Navigate to="/guest-login" state={{ from: location }} replace />
- );
-}
-
-export default Rsvp;