import { Box, Container, Input, Sheet, Typography } from '@mui/joy' import Logo from '../../Logo' import { Button } from '@mui/joy' import { useContext } from 'react' import { useNavigate, useSearchParams } from 'react-router-dom' import { UserContext } from '../../contexts/UserContext' import { JoinCircle } from '../../utils/Fetcher' const JoinCircleView = () => { const { userProfile, setUserProfile } = useContext(UserContext) let [searchParams, setSearchParams] = useSearchParams() const navigate = useNavigate() const code = searchParams.get('code') return ( {/* logo */} Done tick {code && userProfile && ( <> Hi {userProfile?.displayName}, you have been invited to join the circle{' '} Joining will give you access to the circle's chores and members. You can leave the circle later from you Settings page. )} {!code || (!userProfile && ( <> You need to be logged in to join a circle Login or sign up to continue ))} ) } export default JoinCircleView