Refactored the AuthenticationWrapper component to use a render prop instead of the messy prop situation that was before.
For the GuestLayout, it can honestly be folded into AccountLayout component and simply pass isGuest or isCustomer booleans (<AccountLayout isGuest={true}> or <AccountLayout isCustomer={true} to handle the redirect logic since they are essentially the same with only a redirect and inverse logic. For now, I'll leave as is.
TODO: add missing PropTypes validation to all components.
Refactored the AuthenticationWrapper component to use a render prop instead of the messy prop situation that was before.
For the GuestLayout, it can honestly be folded into AccountLayout component and simply pass isGuest or isCustomer booleans (
<AccountLayout isGuest={true}>
or<AccountLayout isCustomer={true}
to handle the redirect logic since they are essentially the same with only a redirect and inverse logic. For now, I'll leave as is.TODO: add missing PropTypes validation to all components.