Skip to content

Commit

Permalink
Merge pull request #276 from l3vels/fix/fine-tuning
Browse files Browse the repository at this point in the history
fix: group navigation
  • Loading branch information
Chkhikvadze authored Oct 31, 2023
2 parents b5f366d + efec970 commit c5aec70
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
7 changes: 4 additions & 3 deletions apps/ui/src/Route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -284,10 +284,7 @@ const Route = () => {
element={<EditContactForm />}
key={document.location.href}
/>
</Router>

<Router path={'groups'} element={<MainRouteLayout />} key={document.location.href}>
<Router index element={<Group />} key={document.location.href} />
<Router
path={'create-group'}
element={<CreateGroupForm />}
Expand All @@ -300,6 +297,10 @@ const Route = () => {
/>
</Router>

{/* <Router path={'groups'} element={<MainRouteLayout />} key={document.location.href}>
<Router index element={<Group />} key={document.location.href} />
</Router> */}

<Router path={'developers'} element={<DevelopersRouteLayout />}>
<Router index element={<ApiKeys />} key={document.location.href} />
<Router path={'logs'} element={<Log />} key={document.location.href} />
Expand Down
4 changes: 2 additions & 2 deletions apps/ui/src/plugins/contact/pages/Group/Groups.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const Groups = () => {
/>

<IconButton
onClick={() => navigate(`/groups/${cell.value}/edit-group`)}
onClick={() => navigate(`/contacts/${cell.value}/edit-group`)}
icon={() => <StyledEditIcon />}
size={IconButton.sizes.SMALL}
kind={IconButton.kinds.TERTIARY}
Expand All @@ -87,7 +87,7 @@ const Groups = () => {
</StyledSectionDescription> */}
</div>
<div>
<ButtonPrimary onClick={() => navigate('/groups/create-group')} size={'small'}>
<ButtonPrimary onClick={() => navigate('/contacts/create-group')} size={'small'}>
{t('add-group')}
</ButtonPrimary>
</div>
Expand Down
2 changes: 1 addition & 1 deletion apps/ui/src/plugins/contact/pages/Group/useCreateGroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const useCreateGroup = () => {
type: 'positive',
open: true,
})
navigate('/groups')
navigate('/contacts')
} catch (e) {
setToast({
message: 'Failed To Add Group!',
Expand Down
2 changes: 1 addition & 1 deletion apps/ui/src/plugins/contact/pages/Group/useEditGroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const useEditGroup = () => {
type: 'positive',
open: true,
})
navigate('/groups')
navigate('/contacts')
} catch (e) {
setToast({
message: 'Failed To Update Group!',
Expand Down

0 comments on commit c5aec70

Please sign in to comment.