Skip to content

Commit

Permalink
web: readable sync error message (#1997)
Browse files Browse the repository at this point in the history
* auto-reload page on sync error

* add back reload button
  • Loading branch information
TalDerei authored Jan 28, 2025
1 parent 6869c52 commit 3fc8c91
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const CondensedBlockSyncStatus = ({
error?: unknown;
}) => {
if (error) {
return <BlockSyncErrorState error={error} />;
return <BlockSyncErrorState />;
}
if (!latestKnownBlockHeight || !fullSyncHeight) {
return <AwaitingSyncState genesisSyncing={!fullSyncHeight} />;
Expand All @@ -41,7 +41,7 @@ export const CondensedBlockSyncStatus = ({
);
};

const BlockSyncErrorState = ({ error }: { error: unknown }) => {
const BlockSyncErrorState = () => {
const reload = () => {
window.location.reload();
};
Expand All @@ -56,7 +56,7 @@ const BlockSyncErrorState = ({ error }: { error: unknown }) => {
<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)}
Block sync error. Ensure your internet connection is stable.
</span>
<button
type='button'
Expand Down

0 comments on commit 3fc8c91

Please sign in to comment.