diff --git a/components/CustomLink/CustomLink.js b/components/CustomLink/CustomLink.js index 9708b74e3..d202799c2 100644 --- a/components/CustomLink/CustomLink.js +++ b/components/CustomLink/CustomLink.js @@ -19,6 +19,7 @@ function CustomLink({ Component: _Component, href, children, ...props }) { const WrappedComponent = React.forwardRef(({ Component, ...props }, ref) => ( )); +WrappedComponent.displayName = 'WrappedComponent'; CustomLink.propTypes = { Component: PropTypes.oneOfType([ diff --git a/components/EventCallout/EventCallout.js b/components/EventCallout/EventCallout.js index 9c3e42866..92f0bed46 100644 --- a/components/EventCallout/EventCallout.js +++ b/components/EventCallout/EventCallout.js @@ -23,6 +23,7 @@ function EventCallout({ height="60px" width="60px" src={imageSrc} + alt={title || ''} rounded="xl" bg="neutrals.300" style={{ objectFit: 'cover' }} diff --git a/components/HomeFeed/HomeFeed.js b/components/HomeFeed/HomeFeed.js index 691f7698a..e8e3c03cc 100644 --- a/components/HomeFeed/HomeFeed.js +++ b/components/HomeFeed/HomeFeed.js @@ -320,7 +320,7 @@ function HomeFeedCTA({ authenticated, personaFeed }) { title={ <> - There's Something for Everyone + There's Something for Everyone } @@ -328,7 +328,7 @@ function HomeFeedCTA({ authenticated, personaFeed }) { mb: { xl: 'xxl' }, mt: { _: 'm', lg: 0, xl: 'l' }, }} - supertitle="Don't miss what God's doing this week!" + supertitle="Don't miss what God's doing this week!" description="From Sunday services to Wednesday night activities, there’s always a way to be a part of what God is doing every week at Long Hollow. Check out our weekly schedule for every member of your family, and mark your calendar for several upcoming events." actions={[ { diff --git a/components/Modals/AuthModal/AuthDetails.js b/components/Modals/AuthModal/AuthDetails.js index ead761f92..4ff9fe5ea 100644 --- a/components/Modals/AuthModal/AuthDetails.js +++ b/components/Modals/AuthModal/AuthDetails.js @@ -16,8 +16,8 @@ function AuthDetails() { handleAuthIdentity, } = useAuthIdentity(); const [_, dispatch] = useAuth(); - const { values, handleSubmit, handleChange } = useForm(() => { - const age = getAge(values.birthDate); + const { values, handleSubmit, handleChange } = useForm(formValues => { + const age = getAge(formValues.birthDate); // Make sure they are at least 13 years of age. if (age < 13) { setError({ @@ -28,9 +28,9 @@ function AuthDetails() { dispatch( updateAuth({ profile: { - ...values, - birthDate: new Date(values.birthDate), - gender: upperFirst(values.gender), + ...formValues, + birthDate: new Date(formValues.birthDate), + gender: upperFirst(formValues.gender), }, }) ); diff --git a/components/Modals/AuthModal/AuthIdentity.js b/components/Modals/AuthModal/AuthIdentity.js index 5ff461231..f0ee98a80 100644 --- a/components/Modals/AuthModal/AuthIdentity.js +++ b/components/Modals/AuthModal/AuthIdentity.js @@ -12,10 +12,11 @@ function AuthIdentity() { setError, handleAuthIdentity, } = useAuthIdentity(); + const identityRef = React.useRef(''); const [checkIfUserExists] = useUserExists({ fetchPolicy: 'network-only', onCompleted: async data => { - const identity = values.identity; + const identity = identityRef.current; const userExists = data?.userExists !== 'NONE'; handleAuthIdentity({ identity, @@ -24,14 +25,15 @@ function AuthIdentity() { }); }, }); - const { values, handleSubmit, handleChange } = useForm(() => { - const identity = values.identity; + const { values, handleSubmit, handleChange } = useForm(formValues => { + const identity = formValues.identity; const validEmail = validateEmail(identity); const validPhoneNumber = validatePhoneNumber(identity); const validIdentity = validEmail || validPhoneNumber; if (validIdentity) { setStatus('LOADING'); - checkIfUserExists({ variables: { identity: values.identity } }); + identityRef.current = identity; + checkIfUserExists({ variables: { identity } }); } else { setStatus('ERROR'); setError({ identity: 'That is not a valid email or phone number.' }); @@ -43,7 +45,7 @@ function AuthIdentity() { return ( <> - Enter your phone number or email address to get started. We'll never + Enter your phone number or email address to get started. We'll never share your information or contact you (unless you ask!). diff --git a/components/Nav/Nav.js b/components/Nav/Nav.js index 7a9f2d24f..6217a284f 100644 --- a/components/Nav/Nav.js +++ b/components/Nav/Nav.js @@ -47,7 +47,7 @@ function Nav({ return () => { router.events.off('routeChangeStart', handleRouteChangeStart); }; - }, []); + }, [router.events, setHoveredItem]); return ( diff --git a/components/SEO/SEO.js b/components/SEO/SEO.js index 61e0c9fe2..eb405b145 100644 --- a/components/SEO/SEO.js +++ b/components/SEO/SEO.js @@ -90,7 +90,7 @@ function SEO(props = {}) { src={`https://www.googletagmanager.com/gtag/js?id=${process.env.NEXT_PUBLIC_GA_CODE}`} />