Closed fhenrich33 closed 3 weeks ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 85.57%. Comparing base (
69a3396
) to head (344a044
). Report is 3 commits behind head on master.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Hey @fhenrich33 Thanks for the quick fix from your side. Unfortunately, I found three other cases which we would also have to add in the if statement.
Thus, I would rather like to fix the general problem then doing a quickfix.
Any request where the route does NOT start with /bases/<baseId>/*
will be redirect to bases/<baseId retrieved with useLoadAndSetGlobalPreferences>/
. The reason is that the route is not found in App.tsx and in NotFoundView it redirects then to the route /
. When useLoadAndSetGlobalPreferences
sets the context of selectedBase
it is then redirected to bases/<baseId retrieved with useLoadAndSetGlobalPreferences>/
.
I think the easiest way is to remove all forwarding from dropapp to routes which do not start with /bases/<baseId>
and do a bit of a refactor once we get into enabling MultiBase access. I will take care of this in dropapp.
Could you quickly check though all navigate
instances and other redirects if the urls always start with bases/<currentBaseId>
? @fhenrich33
Could you quickly check though all
navigate
instances and other redirects if the urls always start withbases/<currentBaseId>
? @fhenrich33
Will do! Please let me know if there's something else I can help with regarding this.
@HaGuesto
If you search all instances of navigate(
with match case on (Alt + C
on VSCode), you will find that all but the instances bellow navigates to bases/<currentBaseId>/*
:
// front/src/providers/Auth0ProviderWithHistory.tsx
// line 14
navigate(appState?.returnTo || window.location.pathname);
// front/src/views/Transfers/TransferAgreementOverview/TransferAgreementOverviewView.tsx
// lines 103, 127
onRightButtonClick = () => navigate("create");
// front/src/components/Table/Table.tsx
// line 21
onClick={() => navigate(row.original.href)}
Tests didn't catch that because we mock on tests from the what would be redirected paths. 😬