Skip to content

Commit

Permalink
fix: [M3-9235] - Longview Detail id param not found locally (#11599)
Browse files Browse the repository at this point in the history
* pass extra params

* Changeset & comment
  • Loading branch information
abailly-akamai authored Feb 4, 2025
1 parent 5bbe436 commit 02ee508
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
5 changes: 5 additions & 0 deletions packages/manager/.changeset/pr-11599-fixed-1738615199594.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Fixed
---

Longview Detail id param not found (local only) ([#11599](https://github.com/linode/manager/pull/11599))
14 changes: 12 additions & 2 deletions packages/manager/src/routes/longview/longviewLazyRoutes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,25 @@ export const longviewLandingLazyRoute = createLazyRoute('/longview')({
// we'll just match the legacy routing behavior
const LongviewDetailWrapper = () => {
const { id } = useParams({ from: '/longview/clients/$id' });
const matchProps = {

if (!id) {
return null;
}

// Leaving this old `match` prop in case it's somehow needed somewhere
// see https://github.com/linode/manager/pull/11599
const props = {
match: {
params: {
id,
},
},
params: {
id,
},
};

return <EnhancedLongviewDetail {...matchProps} />;
return <EnhancedLongviewDetail {...props} />;
};

export const longviewDetailLazyRoute = createLazyRoute('/longview/clients/$id')(
Expand Down

0 comments on commit 02ee508

Please sign in to comment.