diff --git a/src/views/Circles/JoinCircle.jsx b/src/views/Circles/JoinCircle.jsx index febcc99..a62b99f 100644 --- a/src/views/Circles/JoinCircle.jsx +++ b/src/views/Circles/JoinCircle.jsx @@ -7,9 +7,20 @@ import { useUserProfile } from '../../queries/UserQueries' import { useNotification } from '../../service/NotificationProvider' import { JoinCircle } from '../../utils/Fetcher' import { clearPendingInvite, setPendingInvite } from '../../utils/PendingInvite' -import AuthShell from '../Authorization/AuthShell' import { authButtonSx } from '../Authorization/authStyles' import AcknowledgmentModal from '../Modals/Inputs/AcknowledgmentModal' +import { CircleVignette } from '../Onboarding/OnboardingVignettes' + +const EASE = 'cubic-bezier(0.22, 1, 0.36, 1)' + +const enter = (delay = 0) => ({ + animation: `joinCircleIn 520ms ${EASE} ${delay}ms both`, + '@keyframes joinCircleIn': { + from: { opacity: 0, transform: 'translateY(12px)' }, + to: { opacity: 1, transform: 'none' }, + }, + '@media (prefers-reduced-motion: reduce)': { animation: 'none' }, +}) const JoinCircleView = () => { const { data: userProfile, isLoading: isProfileLoading } = useUserProfile() @@ -38,8 +49,10 @@ const JoinCircleView = () => { clearPendingInvite() if (resp.ok) { showAcknowledgment( - 'Your join request has been sent successfully! The circle admin will need to approve your request before you can access the circle and its chores. You will receive a notification once your request is approved.', - 'Join Request Sent!', + 'Your request has been sent. A circle admin will need to approve ' + + "it before you can access the circle and its chores. We'll " + + "notify you when it's approved.", + 'Request sent', () => navigate('/chores'), 'Got it', 'success', @@ -57,7 +70,7 @@ const JoinCircleView = () => { .catch(() => { setIsJoining(false) clearPendingInvite() - showError('Failed to join circle, please try again') + showError('Could not send your join request. Please try again.') }) }, [code, navigate, showAcknowledgment, showError]) @@ -89,14 +102,14 @@ const JoinCircleView = () => { /> ) - let title = "You've been invited to a circle" + let title = "You're invited to join a circle" let subtitle = null let body = null if (!code) { title = 'Invite link is incomplete' subtitle = - "This link doesn't include an invite code. Ask whoever invited you to send the link again." + 'This invite link is missing a code. Ask the person who invited you to send a new link.' body = (