fix: customer route

This commit is contained in:
Rafael Taranto 2025-05-16 08:13:11 +01:00
parent 910f996db6
commit a3dc450497
2 changed files with 5 additions and 2 deletions

View file

@ -285,7 +285,6 @@ const CHECK_AGAINST_SANCTIONS = gql`
const CustomerProfile = memo(() => { const CustomerProfile = memo(() => {
const [, navigate] = useLocation() const [, navigate] = useLocation()
const [showCompliance, setShowCompliance] = useState(false) const [showCompliance, setShowCompliance] = useState(false)
const [wizard, setWizard] = useState(false) const [wizard, setWizard] = useState(false)
const [error, setError] = useState(null) const [error, setError] = useState(null)
@ -298,6 +297,7 @@ const CustomerProfile = memo(() => {
loading: customerLoading, loading: customerLoading,
} = useQuery(GET_CUSTOMER, { } = useQuery(GET_CUSTOMER, {
variables: { customerId }, variables: { customerId },
skip: !customerId,
}) })
const { data: configResponse, loading: configLoading } = useQuery(GET_DATA) const { data: configResponse, loading: configLoading } = useQuery(GET_DATA)

View file

@ -105,7 +105,10 @@ const Routes = () => {
<Transition <Transition
className={wrapperClasses} className={wrapperClasses}
{...transitionProps} {...transitionProps}
in={location === route} in={
location === route ||
(route.includes(':') && location.startsWith(route.split(':')[0]))
}
mountOnEnter mountOnEnter
unmountOnExit> unmountOnExit>
<div className={wrapperClasses}> <div className={wrapperClasses}>