mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-23 00:22:19 +01:00
fix: bad segment edit link (#6390)
## About the changes
Fixes a bad link which leads to editing a global segment from project
settings mimicking
67928209ef/frontend/src/component/segments/EditSegmentButton/EditSegmentButton.tsx (L22-L28)
This commit is contained in:
parent
b4a8b0f780
commit
4f638a1c8d
@ -57,7 +57,7 @@ export const SegmentTable = () => {
|
||||
return segments;
|
||||
}, [segments, projectId]);
|
||||
|
||||
const columns = useMemo(() => getColumns(), []);
|
||||
const columns = useMemo(() => getColumns(projectId), [projectId]);
|
||||
const {
|
||||
getTableProps,
|
||||
getTableBodyProps,
|
||||
@ -172,7 +172,7 @@ export const SegmentTable = () => {
|
||||
);
|
||||
};
|
||||
|
||||
const getColumns = () => [
|
||||
const getColumns = (projectId?: string) => [
|
||||
{
|
||||
id: 'Icon',
|
||||
width: '1%',
|
||||
@ -191,7 +191,11 @@ const getColumns = () => [
|
||||
}: any) => (
|
||||
<LinkCell
|
||||
title={name}
|
||||
to={`/segments/edit/${id}`}
|
||||
to={
|
||||
projectId
|
||||
? `/projects/${projectId}/settings/segments/edit/${id}`
|
||||
: `/segments/edit/${id}`
|
||||
}
|
||||
subtitle={description}
|
||||
/>
|
||||
),
|
||||
|
Loading…
Reference in New Issue
Block a user