Skip to content

Commit eb8033e

Browse files
authored
fix: Fix Hardware Details Link (#1827)
* Using the from property to indicate if the param id is hardwareId. Closes #1823
1 parent 7cd3ad7 commit eb8033e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

dashboard/src/components/Log/LogViewerCard.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { FormattedMessage, useIntl } from 'react-intl';
22

33
import { useMemo, type JSX } from 'react';
44

5-
import { Link, useParams, useRouterState } from '@tanstack/react-router';
5+
import { Link, useRouterState } from '@tanstack/react-router';
66

77
import { SearchIcon } from '@/components/Icons/SearchIcon';
88
import { StatusIcon } from '@/components/Icons/StatusIcons';
@@ -61,10 +61,10 @@ export const LogViewerCard = ({
6161
}
6262
}, [logUrl]);
6363

64-
const { hardwareId } = useParams({ strict: false });
65-
const { treeName, branch, id } = useRouterState({
64+
const { treeName, branch, id, from } = useRouterState({
6665
select: s => s.location.state,
6766
});
67+
const hardwareId = from === 'hardware' ? id : undefined;
6868

6969
const logDataTreeName = logData?.tree_name;
7070
const logDataBranch = logData?.git_repository_branch;

0 commit comments

Comments
 (0)