Skip to content

Commit bef4621

Browse files
wassafshahzadclaude
andcommitted
Fix Terminology "Translate" link dropping the string query (#4622)
The click handler navigated to the link's pathname only, losing `?string=<id>`, so the Terminology project opened on its first string instead of the selected term. Pass pathname + search, as Metadata.tsx already does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 981ca93 commit bef4621

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • translate/src/modules/terms/components

‎translate/src/modules/terms/components/Term.tsx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,11 @@ export function Term({ navigateToPath, term }: Props): React.ReactElement {
3333
};
3434

3535
const handleLinkClick = (ev: React.MouseEvent<HTMLAnchorElement>) => {
36+
const { pathname, search } = ev.currentTarget;
37+
3638
ev.preventDefault();
3739
ev.stopPropagation();
38-
navigateToPath(ev.currentTarget.pathname);
40+
navigateToPath(pathname + search);
3941
};
4042

4143
const cn = classNames(

0 commit comments

Comments
 (0)