Skip to content

Commit

Permalink
Avoid flickering when tablebase evaluation is loading (#390)
Browse files Browse the repository at this point in the history
Co-authored-by: William Oprandi <william.oprandi@gmail.com>
  • Loading branch information
woprandi and woprandi authored Sep 15, 2024
1 parent 755bb42 commit 986c0b8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/panels/analysis/TablebaseInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,11 @@ function TablebaseInfo({
<Accordion.Control>
<Group>
<Text fw="bold">Tablebase</Text>
{isLoading && <Text ta="center">Loading...</Text>}
{isLoading && (
<Group p="xs">
<Badge variant="transparent">Loading...</Badge>
</Group>
)}
{error && <Text ta="center">Error: {error.message}</Text>}
{data && (
<OutcomeBadge category={data.category} turn={turn} wins />
Expand Down

0 comments on commit 986c0b8

Please sign in to comment.