Skip to content

Commit

Permalink
fix: Improve the UI/UX for clone identities (#3934)
Browse files Browse the repository at this point in the history
  • Loading branch information
novakzaballa authored May 17, 2024
1 parent 98a5114 commit 48ac76c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion frontend/web/components/CompareEnvironments.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ class CompareEnvironments extends Component {

<div className='mx-3'>
<Icon
name='arrow-left'
name='arrow-right'
width={20}
fill={
Utils.getFlagsmithHasFeature('dark_mode') ? '#fff' : '#1A2634'
Expand Down
8 changes: 4 additions & 4 deletions frontend/web/components/CompareIdentities.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const CompareIdentities: FC<CompareIdentitiesType> = ({
}) => {
const [leftId, setLeftId] = useState<IdentitySelectType['value']>()
const [rightId, setRightId] = useState<IdentitySelectType['value']>()
const { data: projectFlags } = useGetProjectFlagsQuery({
const { data: projectFlags, refetch } = useGetProjectFlagsQuery({
environment: ProjectStore.getEnvironmentIdFromKey(_environmentId),
project: projectId,
})
Expand Down Expand Up @@ -148,7 +148,6 @@ const CompareIdentities: FC<CompareIdentitiesType> = ({
{'Any existing Identity overrides on '}
<strong>{`${rightIdentityName}`}</strong> {'will be lost.'}
<br />
{'The Multivariate values will not be cloned.'}
</div>
),
destructive: true,
Expand All @@ -159,9 +158,10 @@ const CompareIdentities: FC<CompareIdentitiesType> = ({
identity_id: rightIdentityId,
}).then(() => {
toast('Identity overrides successfully cloned!')
refetch()
})
},
title: 'Clone Identity',
title: 'Clone Identity overrides',
yesText: 'Confirm',
})
}
Expand Down Expand Up @@ -204,7 +204,7 @@ const CompareIdentities: FC<CompareIdentitiesType> = ({
</div>
<div className='mx-3'>
<Icon
name='arrow-left'
name='arrow-right'
width={20}
fill={
Utils.getFlagsmithHasFeature('dark_mode') ? '#fff' : '#1A2634'
Expand Down
1 change: 0 additions & 1 deletion frontend/web/components/IdentityOverridesIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React, { FC, FormEvent } from 'react'
import SegmentsIcon from './svg/SegmentsIcon'
import Tooltip from './Tooltip'
import UsersIcon from './svg/UsersIcon'

Expand Down

0 comments on commit 48ac76c

Please sign in to comment.