mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
18 lines
424 B
TypeScript
18 lines
424 B
TypeScript
import { Text } from '@chakra-ui/react';
|
|
import React from 'react';
|
|
|
|
import useTimeAgoIncrement from 'lib/hooks/useTimeAgoIncrement';
|
|
|
|
interface Props {
|
|
ts: string;
|
|
isEnabled?: boolean;
|
|
}
|
|
|
|
const BlockTimestamp = ({ ts, isEnabled }: Props) => {
|
|
const timeAgo = useTimeAgoIncrement(ts, isEnabled);
|
|
|
|
return <Text variant="secondary" fontWeight={ 400 }>{ timeAgo }</Text>;
|
|
};
|
|
|
|
export default React.memo(BlockTimestamp);
|