Skip to content

Commit

Permalink
fix(ui): add refresh button to block sync status (#1861)
Browse files Browse the repository at this point in the history
  • Loading branch information
VanishMax authored Oct 22, 2024
1 parent 8c036f5 commit 45aceab
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions packages/ui/components/ui/block-sync-status/block-sync-status.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,29 @@ export const CondensedBlockSyncStatus = ({
};

const BlockSyncErrorState = ({ error }: { error: unknown }) => {
const reload = () => {
window.location.reload();
};

return (
<motion.div
className='flex w-full select-none flex-col'
initial={{ opacity: 0.6 }}
animate={{ opacity: 1, transition: { duration: 0.5, ease: 'easeOut' } }}
>
<Progress status='error' value={100} shape='squared' />
<div className='absolute flex w-full justify-between px-2'>
<div className='mt-[-5.5px] font-mono text-[10px] text-red-300'>
Block sync error: {String(error)}
<div className='absolute w-full px-2'>
<div className='mt-[-5.5px] flex gap-2'>
<span className='font-mono text-[10px] text-red-300'>
Block sync error: {String(error)}
</span>
<button
type='button'
className='border-none bg-none font-mono text-[10px] text-red-300 underline'
onClick={reload}
>
Reload
</button>
</div>
</div>
</motion.div>
Expand Down

0 comments on commit 45aceab

Please sign in to comment.