mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
24 lines
535 B
TypeScript
24 lines
535 B
TypeScript
import { Skeleton } from '@chakra-ui/react';
|
|
import React from 'react';
|
|
|
|
import StatusTag from 'ui/shared/statusTag/StatusTag';
|
|
|
|
type Props = {
|
|
status?: boolean;
|
|
isLoading?: boolean;
|
|
}
|
|
|
|
const UserOpStatus = ({ status, isLoading }: Props) => {
|
|
if (status === undefined) {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<Skeleton isLoaded={ !isLoading } display="inline-block">
|
|
<StatusTag type={ status === true ? 'ok' : 'error' } text={ status === true ? 'Success' : 'Failed' }/>
|
|
</Skeleton>
|
|
);
|
|
};
|
|
|
|
export default UserOpStatus;
|