diff --git a/components/case/representation/representationElements.js b/components/case/representation/representationElements.js index fbbe2d10..4d25d5e9 100644 --- a/components/case/representation/representationElements.js +++ b/components/case/representation/representationElements.js @@ -289,7 +289,6 @@ export const RenderTextfield = ({ name={name} id={id} type={type} - validate={[required]} /> ); diff --git a/pages/myportal/representation.js b/pages/myportal/representation.js index cf0b1e63..07e73ca5 100644 --- a/pages/myportal/representation.js +++ b/pages/myportal/representation.js @@ -38,23 +38,28 @@ const Home = (props) => { const dispatch = useDispatch(); - useEffect(async () => { - const thisSession = await getSession(); + useEffect(() => { + const updateAccountStore = async () => { + const thisSession = await getSession(); - if (thisSession) { - let [loggedInUser] = await Promise.all([ - await getPortalLogin(thisSession.user.email), - ]); + if (thisSession) { + let [loggedInUser] = await Promise.all([ + await getPortalLogin(thisSession.user.email), + ]); - dispatch( - setAccountDetails( - await getPersonalAccount(loggedInUser.value[0].contactid) - ) - ); - dispatch(setContainerID(thisSession.user.id)); + dispatch( + setAccountDetails( + await getPersonalAccount( + loggedInUser.value[0].contactid + ) + ) + ); + dispatch(setContainerID(thisSession.user.id)); - //dispatch(setRepresentationSubmit(true)); - } + //dispatch(setRepresentationSubmit(true)); + } + }; + updateAccountStore(); }, [dispatch]); return (