-
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.
Merge branch 'FuelLabs:main' into feat/statsOptimization
- Loading branch information
Showing
41 changed files
with
2,396 additions
and
198 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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
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
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
77 changes: 77 additions & 0 deletions
77
packages/app-explorer/src/systems/Home/components/BlockTableTile.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 |
---|---|---|
@@ -0,0 +1,77 @@ | ||
import { HStack, RoundedContainer, VStack } from '@fuels/ui'; | ||
import { tv } from 'tailwind-variants'; | ||
import { fromNow } from '~/systems/Core/utils/dayjs'; | ||
import { Block } from '../interface/blocks.interface'; | ||
|
||
interface BlockTableProps { | ||
block: Block; | ||
} | ||
|
||
export const BlockTableTile: React.FC<BlockTableProps> = ({ block }) => { | ||
const classes = styles(); | ||
|
||
return ( | ||
<RoundedContainer className="bg-white hover:bg-gray-5 py-3"> | ||
<HStack align={'center'} className="justify-between"> | ||
<div className="space-y-[4px]"> | ||
<p className={classes.paragraphStrong()}>#{block.blockNo}</p> | ||
<p className={classes.paragraph()}>{+block.gasUsed / 10 ** 9} ETH</p> | ||
</div> | ||
<div className="flex items-center gap-[4px] overflow-hidden"> | ||
<p | ||
className={`${classes.paragraph()} overflow-hidden text-ellipsis whitespace-nowrap w-[100px]`} | ||
> | ||
{block.producer} | ||
</p> | ||
</div> | ||
|
||
<div className="space-y-[4px]"> | ||
<VStack gap={'0'}> | ||
<HStack gap={'1'} className="items-center"> | ||
<svg | ||
width="11" | ||
height="8" | ||
viewBox="0 0 11 8" | ||
fill="none" | ||
xmlns="http://www.w3.org/2000/svg" | ||
> | ||
<path | ||
d="M0.875 4.25L3.5 6.875L9.5 0.875" | ||
stroke="#00F58C" | ||
strokeWidth="1.5" | ||
strokeLinecap="round" | ||
strokeLinejoin="round" | ||
/> | ||
</svg> | ||
<p className={classes.paragraphAccent()}>Settled</p> | ||
</HStack> | ||
<p | ||
className={`${classes.paragraph()} overflow-hidden text-ellipsis whitespace-nowrap`} | ||
> | ||
{fromNow(block.timeStamp)} | ||
</p> | ||
</VStack> | ||
</div> | ||
</HStack> | ||
</RoundedContainer> | ||
); | ||
}; | ||
|
||
const styles = tv({ | ||
slots: { | ||
paragraphStrong: [ | ||
'text-[12px]', | ||
'text-[color:var(--gray-12)]', | ||
'font-bold', | ||
' w-[110px]', | ||
], | ||
paragraph: [ | ||
'text-muted', | ||
'text-[12px]', | ||
'p-0', | ||
'whitespace-nowrap', | ||
'text-ellipsis', | ||
], | ||
paragraphAccent: ['text-accent text-[12px] p-0'], | ||
}, | ||
}); |
Oops, something went wrong.