mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-20 00:08:02 +01:00
fix: project settings selected tab bug (#6590)
https://linear.app/unleash/issue/2-2034/project-settings-url-bug This prevents a bug where the wrong tab would show as selected, only present in an edge case where the project has the name of a settings tab.
This commit is contained in:
parent
53354224fc
commit
19ae9b5486
@ -96,7 +96,8 @@ export const ProjectSettings = () => {
|
||||
tabs={tabs}
|
||||
value={
|
||||
tabs.find(
|
||||
({ id }) => id && location.pathname?.includes(`/${id}`),
|
||||
({ id }) =>
|
||||
id && location.pathname?.includes(`/settings/${id}`),
|
||||
)?.id || tabs[0].id
|
||||
}
|
||||
onChange={onChange}
|
||||
|
Loading…
Reference in New Issue
Block a user