@@ -36,6 +36,7 @@ import JSONReference from 'components/JSONReference'
36
36
import { cloneDeep } from 'lodash'
37
37
import ErrorMessage from 'components/ErrorMessage'
38
38
import ProjectStore from 'common/stores/project-store'
39
+ import Icon from 'components/Icon'
39
40
40
41
type PageType = {
41
42
number : number
@@ -135,20 +136,13 @@ const CreateSegment: FC<CreateSegmentType> = ({
135
136
136
137
const isError = createError || updateError
137
138
const isLimitReached =
138
- ProjectStore . getTotalSegments ( ) >= ProjectStore . getMaxFeaturesAllowed ( )
139
+ ProjectStore . getTotalSegments ( ) >= ProjectStore . getMaxSegmentsAllowed ( )
139
140
140
141
const THRESHOLD = 90
141
142
const segmentsLimitAlert = Utils . calculateRemainingLimitsPercentage (
142
143
ProjectStore . getTotalSegments ( ) ,
143
- ProjectStore . getMaxFeaturesAllowed ( ) ,
144
- THRESHOLD ,
145
- )
146
-
147
- console . log (
148
- 'DEBUG: ProjectStore.getTotalSegments()c:' ,
149
- ProjectStore . getTotalSegments ( ) ,
150
- 'ProjectStore.getMaxSegmentsAllowed()c:' ,
151
144
ProjectStore . getMaxSegmentsAllowed ( ) ,
145
+ THRESHOLD ,
152
146
)
153
147
154
148
const addRule = ( type = 'ANY' ) => {
@@ -526,6 +520,7 @@ const CreateSegment: FC<CreateSegmentType> = ({
526
520
title = 'Environment'
527
521
component = {
528
522
< EnvironmentSelect
523
+ projectId = { `${ projectId } ` }
529
524
value = { environmentId }
530
525
onChange = { ( environmentId : string ) => {
531
526
setEnvironmentId ( environmentId )
@@ -600,17 +595,35 @@ const CreateSegment: FC<CreateSegmentType> = ({
600
595
< div className = 'font-weight-medium' >
601
596
{ identifier }
602
597
</ div >
603
- < div
604
- className = { `${
605
- inSegment
606
- ? 'font-weight-medium text-primary'
607
- : 'text-muted fs-small lh-sm'
598
+ < Row
599
+ className = { `font-weight-medium fs-small lh-sm ${
600
+ inSegment ? 'text-primary' : 'faint'
608
601
} `}
609
602
>
610
- { inSegment
611
- ? 'User in segment'
612
- : 'Not in segment' }
613
- </ div >
603
+ { inSegment ? (
604
+ < >
605
+ < Icon
606
+ name = 'checkmark-circle'
607
+ width = { 20 }
608
+ fill = '#6837FC'
609
+ />
610
+ < span className = 'ml-1' >
611
+ User in segment
612
+ </ span >
613
+ </ >
614
+ ) : (
615
+ < >
616
+ < Icon
617
+ name = 'minus-circle'
618
+ width = { 20 }
619
+ fill = '#9DA4AE'
620
+ />
621
+ < span className = 'ml-1' >
622
+ Not in segment
623
+ </ span >
624
+ </ >
625
+ ) }
626
+ </ Row >
614
627
</ Row >
615
628
)
616
629
} }
0 commit comments