Skip to content

Commit

Permalink
Trim current path to 2nd level by default for LinkToEdit
Browse files Browse the repository at this point in the history
  • Loading branch information
alexlipovka committed Feb 6, 2025
1 parent 7eb2aee commit 351182a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/LinkToEdit/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export function LinkToEdit(props: LinkToEditProps) {
);
}

const pathname = location.pathname.split('/').slice(0, 2).join('/');
const pathname = location.pathname.split('/').slice(0, 3).join('/');
const entityResource = getSourceFromProvenance(provenance);
const qrId = entityResource?.id;
return <Link to={to ? `${to}/${qrId}` : `${pathname}/documents/${qrId}`}>{name}</Link>;
Expand Down

0 comments on commit 351182a

Please sign in to comment.