-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tweak(tupaiaWeb): RN-1420: Use dashboard codes in URLs #5884
base: dev
Are you sure you want to change the base?
Conversation
project?.code === projectCode && | ||
!activeDashboard; | ||
|
||
useEffect(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a bonus to replace this but of code I reckon
packages/tupaia-web/src/Routes.tsx
Outdated
@@ -92,7 +134,7 @@ export const Routes = () => { | |||
<Route path="/:projectCode/:entityCode" element={<ProjectPageDashboardRedirect />} /> | |||
|
|||
{/* The Dashboard has to be rendered below the Map, otherwise the map will re-mount on route changes */} | |||
<Route path={ROUTE_STRUCTURE} element={<Dashboard />} /> | |||
<Route path={ROUTE_STRUCTURE} element={<DashboardNameToCodeRedirect />} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is pretty minor but I was initially confused by the naming of DashboardNameToCodeRedirect as I didn't realise that it included the Dashboard component. Maybe it should be just called DashboardRoute or DashboardCodeRoute or something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great - it really helps having discussed it first 👍
Issue RN-1420: Use dashboard codes in URLs
Changes:
dashboardName
to bedashboardCode