mirror of
https://github.com/hazemKrimi/crimson-quirks-ui.git
synced 2026-05-02 02:30:29 +00:00
Fix routing bug
This commit is contained in:
@@ -76,7 +76,9 @@ const Category = () => {
|
||||
variant='primary-action'
|
||||
text='Settings'
|
||||
iconLeft={<Settings />}
|
||||
onClick={() => history.push(`/category-settings/${id}`)}
|
||||
onClick={() =>
|
||||
history.push(`/category-settings/${id || category.id}`)
|
||||
}
|
||||
/>
|
||||
</Box>
|
||||
<Box>
|
||||
|
||||
@@ -81,7 +81,9 @@ const Feature = () => {
|
||||
variant='primary-action'
|
||||
text='Settings'
|
||||
iconLeft={<Settings />}
|
||||
onClick={() => history.push(`/feature-settings/${id}`)}
|
||||
onClick={() =>
|
||||
history.push(`/feature-settings/${id || feature.id}`)
|
||||
}
|
||||
/>
|
||||
</Box>
|
||||
<Box marginBottom='30px'>
|
||||
|
||||
@@ -141,7 +141,9 @@ const Template = () => {
|
||||
text='Prototype'
|
||||
iconLeft={<Design />}
|
||||
disabled={!prototype && role === 'productOwner'}
|
||||
onClick={() => history.push(`/prototype/${id}`)}
|
||||
onClick={() =>
|
||||
history.push(`/prototype/${id || template.id}`)
|
||||
}
|
||||
/>
|
||||
</Box>
|
||||
{role === 'productOwner' && (
|
||||
@@ -151,7 +153,11 @@ const Template = () => {
|
||||
variant='primary-action'
|
||||
text='Settings'
|
||||
iconLeft={<Settings />}
|
||||
onClick={() => history.push(`/template-settings/${id}`)}
|
||||
onClick={() =>
|
||||
history.push(
|
||||
`/template-settings/${id || template.id}`
|
||||
)
|
||||
}
|
||||
/>
|
||||
</Box>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user