mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
28 lines
778 B
TypeScript
28 lines
778 B
TypeScript
import React from 'react';
|
|
|
|
import config from 'configs/app';
|
|
import type { AlertProps } from '@luxfi/ui/alert';
|
|
import { Alert } from '@luxfi/ui/alert';
|
|
|
|
interface Props extends AlertProps {
|
|
view?: 'block' | 'tx';
|
|
}
|
|
|
|
const BlockPendingUpdateAlert = ({ view = 'block', ...props }: Props) => {
|
|
if (!config.UI.views.block.pendingUpdateAlertEnabled) {
|
|
return null;
|
|
}
|
|
|
|
const content = view === 'block' ?
|
|
'Block is being re-synced. Details may be incomplete until the update is finished.' :
|
|
'This transaction is part of a block that is being re-synced. Details may be incomplete until the update is finished.';
|
|
|
|
return (
|
|
<Alert status="info" showIcon { ...props }>
|
|
{ content }
|
|
</Alert>
|
|
);
|
|
};
|
|
|
|
export default React.memo(BlockPendingUpdateAlert);
|