import React from 'react';
import { useMemo } from 'react';
import { useLocation, Navigate, Outlet } from 'react-router-dom';
import { useAppSelector } from '../hooks';
import { selectGuest } from '../slices/auth/guestSlice';
const authenticate = () => {
const guest = useAppSelector(selectGuest);
return useMemo(() => ({ guest }), [guest]);
};
function Rsvp() {
const auth = authenticate();
const location = useLocation();
return auth?.guest ? (
) : (
);
}
export default Rsvp;