-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bd4fadf
commit c0f6390
Showing
4 changed files
with
22 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 9 additions & 15 deletions
24
packages/app-explorer/src/systems/Block/components/BlockTimeItem.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,23 @@ | ||
import { Text, VStack } from '@fuels/ui'; | ||
import { Text, VStack, useBreakpoints } from '@fuels/ui'; | ||
|
||
type BlockTimeItemProps = { | ||
timeAgo: string; | ||
}; | ||
|
||
export default function BlockTimeItem({ timeAgo }: BlockTimeItemProps) { | ||
// const timeDate = new Date(time); | ||
|
||
// const formattedTime = timeDate.toLocaleString('en-US', { | ||
// year: 'numeric', | ||
// month: 'short', | ||
// day: 'numeric', | ||
// hour: 'numeric', | ||
// minute: 'numeric', | ||
// hour12: true, | ||
// }); | ||
const { isMobile } = useBreakpoints(); | ||
|
||
return ( | ||
<VStack gap="0px"> | ||
<Text className="text-[0.7rem] m-0 text-center whitespace-nowrap"> | ||
<Text | ||
className={ | ||
isMobile | ||
? 'text-[0.7rem] pr-[0px] text-end whitespace-nowrap' | ||
: 'text-[0.7rem] text-center whitespace-nowrap' | ||
} | ||
> | ||
{timeAgo} | ||
</Text> | ||
{/* <Text className="text-[0.7rem] p-0 m-0 text-[#9f9f9f] whitespace-nowrap"> | ||
{formattedTime} | ||
</Text> */} | ||
</VStack> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters