Skip to content

Commit

Permalink
fix(claims): 🐛 Catch undefined values
Browse files Browse the repository at this point in the history
  • Loading branch information
Nudelsuppe42 committed Feb 10, 2024
1 parent ec6ed16 commit 1f30355
Showing 1 changed file with 24 additions and 22 deletions.
46 changes: 24 additions & 22 deletions src/pages/admin/claims.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,30 +84,32 @@ const Settings = ({ data: tempData }: any) => {
requiredPermissions={['admin.admin']}
>
<AdminSettingsTabs>
<Paper withBorder radius={'md'} p={'xl'}>
<Group>
<Title order={2}>Buildings</Title>
</Group>
{progress?.buildings && (
<Paper withBorder radius={'md'} p={'xl'}>
<Group>
<Title order={2}>Buildings</Title>
</Group>

<Button mt="md" loading={progress > 0} onClick={handleCalculateBuildings}>
Calculate Building Counts
</Button>
<Checkbox
label={'Skip already indexed claims (building count > 0)'}
mt={'md'}
checked={skipExistingBuildings}
onChange={(v) => setSkipExistingBuildings(v.target.checked)}
/>
<Tooltip label={progress.buildings.done + '/' + progress.buildings.total}>
<Progress
value={(progress.buildings.done / progress.buildings.total) * 100}
mt="md"
animated
radius="xl"
size="xl"
<Button mt="md" loading={progress > 0} onClick={handleCalculateBuildings}>
Calculate Building Counts
</Button>
<Checkbox
label={'Skip already indexed claims (building count > 0)'}
mt={'md'}
checked={skipExistingBuildings}
onChange={(v) => setSkipExistingBuildings(v.target.checked)}
/>
</Tooltip>
</Paper>
<Tooltip label={progress.buildings.done + '/' + progress.buildings.total}>
<Progress
value={(progress.buildings.done / progress.buildings.total) * 100}
mt="md"
animated
radius="xl"
size="xl"
/>
</Tooltip>
</Paper>
)}
</AdminSettingsTabs>
</Page>
);
Expand Down

0 comments on commit 1f30355

Please sign in to comment.