Skip to content

Commit f99d195

Browse files
committed
fix: display message when no district is selected for revenue circles
1 parent b0bb13a commit f99d195

File tree

1 file changed

+20
-16
lines changed

1 file changed

+20
-16
lines changed

app/[locale]/[state]/analytics/components/filter-component.tsx

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -280,22 +280,26 @@ export const RenderOptions = ({
280280
: revenueSelected
281281
}
282282
>
283-
{options.map((item: any, idx: any) =>
284-
item.type === 'group' ? (
285-
<div
286-
key={idx}
287-
style={{
288-
backgroundColor: '#F7F7F8',
289-
padding: '10px',
290-
marginTop: '15px',
291-
}}
292-
>
293-
<span>{item.label}</span>
294-
</div>
295-
) : (
296-
<RadioItem key={idx} value={item.value}>
297-
{item.label}
298-
</RadioItem>
283+
{value === 'revenue-circle' && !regionSelected ? (
284+
<div>Please select a district</div>
285+
) : (
286+
options.map((item: any, idx: any) =>
287+
item.type === 'group' ? (
288+
<div
289+
key={idx}
290+
style={{
291+
backgroundColor: '#F7F7F8',
292+
padding: '10px',
293+
marginTop: '15px',
294+
}}
295+
>
296+
<span>{item.label}</span>
297+
</div>
298+
) : (
299+
<RadioItem key={idx} value={item.value}>
300+
{item.label}
301+
</RadioItem>
302+
)
299303
)
300304
)}
301305
</RadioGroup>

0 commit comments

Comments
 (0)