Skip to content

Commit

Permalink
only show refresh when env id exists
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagoapolo committed Jan 8, 2025
1 parent e16ae16 commit 0b0e28f
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions frontend/web/components/modals/CreateSegmentUsersTabContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,14 @@ const CreateSegmentUsersTabContent: React.FC<
pages: undefined,
})
}}
onRefresh={() => {
if (!environmentId) return
identities?.results.forEach((identity) =>
AppActions.getIdentitySegments(projectId, identity.id),
)
}}
onRefresh={
environmentId
? () =>
identities?.results.forEach((identity) =>
AppActions.getIdentitySegments(projectId, identity.id),
)
: undefined
}
renderRow={(
{ id, identifier }: { id: string; identifier: string },
index: number,
Expand Down

0 comments on commit 0b0e28f

Please sign in to comment.