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 '../slices/authSlice';
const authenticate = () => {
const guest = useSelector(selectCurrentGuest);
return useMemo(() => ({ guest }), [guest]);
};
function Rsvp() {
const auth = authenticate();
const location = useLocation();
return auth?.guest ? (
<>
>
) : (
);
}
export default Rsvp;