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

View file

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