Skip to content
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

fix: [M3-9235] - Longview Detail id param not found locally #11599

Merged
merged 2 commits into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,
},
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If anyone has any clue why this was working without this when implemented previously (and why this isn't an issue in production), please let me know. Considering this is working fine and that Longview will be deprecated in the not so long term, I did not do a full investigation.

};

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

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