Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frontend homepage #608

Open
wants to merge 46 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
8a12063
update homepage
raghukapur9 Sep 26, 2024
5cddbf2
fix: key warning
aashaykapoor Sep 26, 2024
93fb9e8
fix: repeated time values
aashaykapoor Sep 26, 2024
94bccf1
fix: incorrect daily transactio value
aashaykapoor-bimaplan Sep 26, 2024
5293537
remove unused table component
aashaykapoor-bimaplan Sep 26, 2024
77a56ca
added Grid Table for view all blocks
raghukapur9 Sep 26, 2024
6c42f5f
fixed import typo
raghukapur9 Sep 26, 2024
a493330
fix: add use server to server component
aashaykapoor Sep 26, 2024
998caa3
chore: sync all-blocks
aashaykapoor Sep 26, 2024
31f5da8
removed GridTable stories file
raghukapur9 Sep 26, 2024
c52bdb5
Fix
shivam-25 Sep 26, 2024
043b655
Merge branch 'FuelLabs:main' into frontend-homepage
raghukapur9 Sep 26, 2024
67e4f78
home page bug fix
ankit723 Sep 27, 2024
81a34eb
fix: add lazy loading and performance improvements
aashaykapoor Sep 27, 2024
29bf3bb
fix
aashaykapoor Sep 27, 2024
16fab5b
fix: type
aashaykapoor Sep 27, 2024
1553d48
Merge branch 'FuelLabs:main' into frontend-homepage
raghukapur9 Sep 27, 2024
2ced675
Merge branch 'FuelLabs:main' into frontend-homepage
raghukapur9 Sep 27, 2024
3a0e053
site wide bug fix
ankit723 Sep 28, 2024
9b14e47
site wide bug fix
ankit723 Sep 28, 2024
06a0884
fix: redundant issues
aashaykapoor Sep 30, 2024
d798703
blocks title fixed
ankit723 Sep 30, 2024
1d39e26
Merge branch 'fix/ui-issues' of https://github.com/DevForce99/fuel-ex…
ankit723 Sep 30, 2024
6e0389a
blocks title fixed
ankit723 Oct 1, 2024
ad41d6d
Merge pull request #27 from DevForce99/fix/ui-issues
aashaykapoor Oct 1, 2024
c4f221b
add unit to block rewards
aashaykapoor Oct 1, 2024
57fe71d
remove commented code
aashaykapoor Oct 1, 2024
f3bd138
fix block table css
aashaykapoor Oct 1, 2024
3f0fa3e
add mobile responsiveness to blocks
aashaykapoor Oct 2, 2024
325a0c8
Merge branch 'FuelLabs:main' into frontend-homepage
raghukapur9 Oct 2, 2024
5cf876b
ui refactorings
aashaykapoor Oct 2, 2024
1e43118
tooltip and the pagination fixed
ankit723 Oct 3, 2024
043bdf6
tooltip and the pagination fixed
ankit723 Oct 3, 2024
c664f24
fix: overflow
aashaykapoor Oct 4, 2024
6e245f5
fix: overflows
aashaykapoor Oct 4, 2024
ef96688
fix
aashaykapoor Oct 4, 2024
44c37af
fix copy onclick
aashaykapoor Oct 4, 2024
bd4fadf
fix: loader
aashaykapoor Oct 4, 2024
c0f6390
chore: responsive fixes
aashaykapoor Oct 4, 2024
2bf0410
fix blocs
aashaykapoor Oct 4, 2024
028b1ee
update tool tip
aashaykapoor Oct 4, 2024
e2003f8
chore: remove tooltip on tab
aashaykapoor Oct 4, 2024
1208ef3
fix: scrolling while pagination
aashaykapoor Oct 5, 2024
b54423f
normalize rewards
aashaykapoor Oct 7, 2024
bbc1705
disable scrolling on back
aashaykapoor Oct 7, 2024
5115a34
fix ui padding
aashaykapoor Oct 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,14 @@ export default function BlockEfficiencyItem({
current,
total,
}: BlockEfficiencyItemProps) {
// Convert current and total to millions
const currentInMillions = current / 1_000_000;
const totalInMillions = total / 1_000_000;

// Calculate progress percentage
const progress = (current / total) * 100;

return (
<Box>
<VStack gap="2">
<VStack gap="0.5" p={'1'}>
<HStack className="justify-between items-center">
{/* Format current and total as M (millions) */}
<Text className="font-inter text-gray-10 text-[0.7rem] whitespace-nowrap">
Expand All @@ -39,7 +37,7 @@ export default function BlockEfficiencyItem({
<div className="w-full h-[4px] rounded-full bg-gray-5">
<div
className="h-full bg-brand rounded-full"
style={{ width: `${progress}%` }}
style={{ width: `${progress > 100 ? 100 : progress}%` }}
/>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Box, Copyable, HStack, Text, VStack } from '@fuels/ui';
import Link from 'next/link';

export interface BlockItemProps {
blockId: string;
Expand All @@ -7,20 +8,44 @@ export interface BlockItemProps {

export default function BlockItem({ blockId, ethValue }: BlockItemProps) {
return (
<VStack gap="1">
<HStack>
<VStack gap="">
<HStack gap={'0'}>
<Box>
<Copyable
value={blockId}
className="font-mono font-semibold text-sm "
className="font-mono font-semibold text-sm whitespace-nowrap"
>
#{blockId}
</Copyable>
</Box>
</HStack>
<Text className="text-gray-10 text-xs text-ellipsis w-[7rem]">
{ethValue} ETH
</Text>
<Link href={`/block/${blockId}/simple`}>
<div className="flex sm:hidden items-center gap-0">
{
<svg
xmlns="http://www.w3.org/2000/svg"
width="18"
height="18"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="1.2"
stroke-linecap="round"
stroke-linejoin="round"
className="text-icon inline-flex items-center fuel-Icon"
>
<path d="M14 11h1a2 2 0 0 1 2 2v3a1.5 1.5 0 0 0 3 0v-7l-3 -3" />
<path d="M4 20v-14a2 2 0 0 1 2 -2h6a2 2 0 0 1 2 2v14" />
<path d="M3 20l12 0" />
<path d="M18 7v1a1 1 0 0 0 1 1h1" />
<path d="M4 11l10 0" />
</svg>
}
<Text className=" text-gray-10 text-xs text-ellipsis w-[7rem]">
{ethValue} ETH
</Text>
</div>
</Link>
</VStack>
);
}
Original file line number Diff line number Diff line change
@@ -1,28 +1,25 @@
import { Text, VStack } from '@fuels/ui';
import { Box, Text, VStack, useBreakpoints } from '@fuels/ui';

type BlockTimeItemProps = {
time: Date;
timeAgo: string;
};

export default function BlockTimeItem({ time, 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,
});
export default function BlockTimeItem({ timeAgo }: BlockTimeItemProps) {
const { isMobile } = useBreakpoints();

return (
<VStack gap="0px">
<Text className="text-[0.7rem] p-0 m-0 text-[#9f9f9f]">{timeAgo}</Text>
<Text className="text-[0.7rem] p-0 m-0 text-[#9f9f9f] whitespace-nowrap">
{formattedTime}
</Text>
</VStack>
<Box className="text-ellipsis">
<VStack gap="0px" className={isMobile ? 'w-full' : ''}>
<Text
className={
isMobile
? 'truncate w-100 text-[0.7rem] text-end text-ellipsis overflow-hidden'
: 'text-[0.7rem] text-center whitespace-nowrap max-w-full'
}
>
{timeAgo}
</Text>
</VStack>
</Box>
);
}
Loading
Loading