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

Feat/blocklist #1569

Merged
merged 70 commits into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from 66 commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
d2a3462
feat: grouped by btc block list view
He1DAr Mar 19, 2024
674a208
feat(blocklist): created new hk to fetch data for all block views
BLuEScioN Mar 22, 2024
3d4651e
feat(grouped-by-btc-block-data-fetching): work in progress
BLuEScioN Mar 22, 2024
614e9ef
feat(blocklist): added grp by btc functionality
BLuEScioN Mar 22, 2024
43132c7
feat(grouped-by-btc-block-data-fetching): work in progress
BLuEScioN Mar 23, 2024
1c4f039
feat(grouped-by-btc-block-data-fetching): work in progress
BLuEScioN Mar 23, 2024
f891390
feat(grouped-by-btc-block-data-fetching): work in progress
BLuEScioN Mar 23, 2024
1ef1300
feat(blocklist): home+blocks page data fetching working
BLuEScioN Mar 26, 2024
2bbf018
feat(grouped-by-btc-block-list-view-2): work in progress
BLuEScioN Mar 27, 2024
1790920
feat(grouped-by-btc-block-list-view-2): finished headers ui
BLuEScioN Mar 27, 2024
52d3004
feat(grouped-by-btc-block-list-view-2): converting grid into table
BLuEScioN Mar 28, 2024
9497de3
feat(grouped-by-btc-block-list-view-3): work in progress
BLuEScioN Apr 1, 2024
0592fc4
feat(grouped-by-btc-block-list-view-3): work in progress
BLuEScioN Apr 1, 2024
1d88710
feat(grouped-by-btc-block-list-view-3): skeletons.btcblock page
BLuEScioN Apr 5, 2024
a70d6c3
feat(grouped-by-btc-block-list-view-3): got all the data fetching done
BLuEScioN Apr 5, 2024
8f27d06
feat(grouped-by-btc-block-list-view-3): fixing up loading skeletons
BLuEScioN Apr 5, 2024
9ce356d
feat(grouped-by-btc-block-list-view-3): new burnblockgrp
BLuEScioN Apr 8, 2024
12d87d2
feat(grouped-by-btc-block-list-view-3): add btc blocks at the end
BLuEScioN Apr 9, 2024
4dd6625
feat(grouped-by-btc-block-list-view-3): added table layout for ungrouped
BLuEScioN Apr 10, 2024
9d0ccde
feat(grouped-by-btc-block-list-view-3): updated grid layout
BLuEScioN Apr 10, 2024
f3da411
feat(grouped-by-btc-block-list-view-3): so so much
BLuEScioN Apr 11, 2024
a21d8c3
feat(grouped-by-btc-block-list-view-3): attempting to fix fading
BLuEScioN Apr 12, 2024
cc89426
feat(grouped-by-btc-block-list-view-3): fixed state loop
BLuEScioN Apr 12, 2024
c1e9d43
feat(grouped-by-btc-block-list-view-3): fixed loading animations
BLuEScioN Apr 12, 2024
3a88285
feat(grouped-by-btc-block-list-view-3): added skeleton for blocks page
BLuEScioN Apr 12, 2024
334d792
feat(grouped-by-btc-block-list-view-3): polished block list skeles
BLuEScioN Apr 12, 2024
a14bf8f
feat(grouped-by-btc-block-list-view-3): added data 2 1sy header
BLuEScioN Apr 12, 2024
ad84ce0
feat(grouped-by-btc-block-list-view-3): fixing build issues
BLuEScioN Apr 15, 2024
b774590
feat(grouped-by-btc-block-list-view-3): fixing build issues
BLuEScioN Apr 15, 2024
6719e7b
feat(grouped-by-btc-block-list-view-3): fixing linting issues'
BLuEScioN Apr 15, 2024
b3a89a2
feat(grouped-by-btc-block-list-view-3): fixing tests
BLuEScioN Apr 15, 2024
8b898b4
feat(grouped-by-btc-block-list-view-3): fixed 1 blk bug
BLuEScioN Apr 17, 2024
af2bf08
feat(blocklist): rebased and reverted some bk 2 main
BLuEScioN Apr 17, 2024
017d769
feat(blocklist): fixed merge markers
BLuEScioN Apr 17, 2024
20fdf83
feat(blocklist): cleaning pr
BLuEScioN Apr 17, 2024
44f91c6
feat(blocklist): cleaning pr
BLuEScioN Apr 17, 2024
240cb4a
feat(blocklist): cleaning pr
BLuEScioN Apr 17, 2024
4291961
feat(blocklist): fixed blks pg ungrped live
BLuEScioN Apr 22, 2024
7587425
feat(blocklist): fixed blks pg ungrped live
BLuEScioN Apr 22, 2024
a75c54a
feat(blocklist): cleaning pr
BLuEScioN Apr 23, 2024
d9974ba
feat(blocklist): cleaning pr
BLuEScioN Apr 23, 2024
1a19be1
feat(blocklist): cleaning pr
BLuEScioN Apr 23, 2024
8cf7561
feat(blocklist): cleaning pr
BLuEScioN Apr 23, 2024
0d9cf30
feat(blocklist): original UI showing if not naka
BLuEScioN Apr 23, 2024
7348988
feat(blocklist): ui fixes
BLuEScioN Apr 23, 2024
d5abea8
feat(blocklist): responding to feedback
BLuEScioN Apr 23, 2024
c8dd2f0
feat(blocklist): fixing build issues
BLuEScioN Apr 23, 2024
528d661
feat(blocklist): fixing linting and build issues
BLuEScioN Apr 23, 2024
0bb9ae7
feat(blocklist): updating tests
BLuEScioN Apr 23, 2024
564996f
feat(blocklist): fixing linting
BLuEScioN Apr 23, 2024
9a6e478
feat(blocklist): fixing linting and build issues
BLuEScioN Apr 23, 2024
5abad35
feat(blocklist): adpated updatedblocklist to use new websocket
BLuEScioN Apr 23, 2024
3262063
feat(blocklist): linting
BLuEScioN Apr 23, 2024
015ccba
feat(blocklist): cleanign pr
BLuEScioN Apr 23, 2024
670322e
feat(blocklist): build issue
BLuEScioN Apr 23, 2024
0629d6e
feat(blocklist): build issue
BLuEScioN Apr 23, 2024
42eef71
feat(blocklist): linting
BLuEScioN Apr 23, 2024
9cbad61
feat(blocklist): rebased main + build issues
BLuEScioN Apr 23, 2024
cfdccc7
feat(blocklist): reverted prettier changes
BLuEScioN Apr 24, 2024
93cf515
feat(blocklist): addressed pr feedback
BLuEScioN Apr 24, 2024
d153d8c
feat(blocklist): added unit test
BLuEScioN Apr 24, 2024
aa70453
feat(blocklist): fixed footer blocks count
BLuEScioN Apr 24, 2024
cd4fa67
feat(blocklist): updated lock file
BLuEScioN Apr 24, 2024
683eb3a
feat(blocklist): linting
BLuEScioN Apr 24, 2024
f726a60
feat(blocklist): style fixes
BLuEScioN Apr 24, 2024
7d492fc
feat(blocklist): renamed socket files
BLuEScioN Apr 24, 2024
6018757
feat(blocklist): fixed skeles. fixed key errors
BLuEScioN Apr 25, 2024
14a633e
feat(blocklist): linting
BLuEScioN Apr 25, 2024
a5493ec
feat(blocklist): fixing tests
BLuEScioN Apr 25, 2024
830ccbc
feat(blocklist): fix duplicate btc blks on grouped list
BLuEScioN Apr 25, 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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"@segment/analytics-next": "1.60.0",
"@segment/snippet": "4.16.2",
"@stacks/auth": "6.9.0",
"@stacks/blockchain-api-client": "7.9.0-beta.1",
"@stacks/blockchain-api-client": "7.10.0",
"@stacks/common": "6.8.1",
"@stacks/connect": "7.4.0",
"@stacks/connect-react": "22.2.0",
Expand Down
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 25 additions & 15 deletions src/app/PageClient.tsx
Original file line number Diff line number Diff line change
@@ -1,34 +1,39 @@
'use client';

import { NextPage } from 'next';
import dynamic from 'next/dynamic';

import { DEFAULT_BLOCKS_LIST_LIMIT, DEFAULT_LIST_LIMIT_SMALL } from '../common/constants/constants';
import { useGlobalContext } from '../common/context/useAppContext';
import { NetworkModes } from '../common/types/network';

Check warning on line 8 in src/app/PageClient.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/PageClient.tsx#L8

Added line #L8 was not covered by tests
import { TxListTabs } from '../features/txs-list/tabs/TxListTabs';
import { Grid } from '../ui/Grid';
import { SkeletonBlockList } from './_components/BlockList/SkeletonBlockList';
import { UpdatedBlocksList } from './_components/BlockList/UpdatedBlockList';
import { PageTitle } from './_components/PageTitle';
import { Stats } from './_components/Stats/Stats';

const NonPaginatedBlockListLayoutA = dynamic(
() =>
import('./_components/BlockList/LayoutA/NonPaginated').then(
mod => mod.NonPaginatedBlockListLayoutA
),
const UpdatedBlockListDynamic = dynamic(
() => import('./_components/BlockList/UpdatedBlockList').then(mod => mod.UpdatedBlocksList),

Check warning on line 16 in src/app/PageClient.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/PageClient.tsx#L16

Added line #L16 was not covered by tests
{
loading: () => <SkeletonBlockList />,
ssr: false,
}
);

const BlocksList = dynamic(() => import('./_components/BlockList').then(mod => mod.BlocksList), {
loading: () => <SkeletonBlockList />,
ssr: false,
});
const HomePageBlockListDynamic = dynamic(
() =>
import('./_components/BlockList/HomePage/HomePageBlockList').then(mod => mod.HomePageBlockList),

Check warning on line 25 in src/app/PageClient.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/PageClient.tsx#L25

Added line #L25 was not covered by tests
{
loading: () => <SkeletonBlockList />,

Check warning on line 27 in src/app/PageClient.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/PageClient.tsx#L27

Added line #L27 was not covered by tests
ssr: false,
}
);

export default function Home() {
const { activeNetwork, activeNetworkKey } = useGlobalContext();
const Home: NextPage = () => {
const { activeNetworkKey, activeNetwork } = useGlobalContext();
const chain = activeNetwork.mode;

Check warning on line 34 in src/app/PageClient.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/PageClient.tsx#L32-L34

Added lines #L32 - L34 were not covered by tests
const isNaka1Testnet =
chain === NetworkModes.Testnet && activeNetworkKey.indexOf('nakamoto-1') !== -1;
return (
<>
<PageTitle data-test="homepage-title">Stacks Explorer</PageTitle>
Expand All @@ -39,9 +44,14 @@
gridTemplateColumns={['100%', '100%', '100%', 'minmax(0, 0.6fr) minmax(0, 0.4fr)']}
>
<TxListTabs limit={DEFAULT_LIST_LIMIT_SMALL} showFilterButton={false} />

<UpdatedBlocksList limit={DEFAULT_BLOCKS_LIST_LIMIT} />
{isNaka1Testnet ? (
<HomePageBlockListDynamic />
) : (
<UpdatedBlockListDynamic limit={DEFAULT_BLOCKS_LIST_LIMIT} />
)}
</Grid>
</>
);
}
};

export default Home;

Check warning on line 57 in src/app/PageClient.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/PageClient.tsx#L57

Added line #L57 was not covered by tests
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
'use client';

import { ScaleFade, SlideFade } from '@chakra-ui/react';
import { FC, memo, useEffect, useState } from 'react';
import { FC, useEffect, useState } from 'react';

import { Box } from '../../../ui/Box';
import { Button } from '../../../ui/Button';
import { Collapse } from '../../../ui/Collapse';
import { useDisclosure } from '../../../ui/hooks/useDisclosure';
import { BlockAndMicroblocksItem } from './BlockAndMicroblocksItem';
import { EnhancedBlock } from './types';

export const animationDuration = 0.8;

export const AnimatedBlockAndMicroblocksItem: FC<{
block: EnhancedBlock;
onAnimationExit?: () => void;
Expand Down
2 changes: 1 addition & 1 deletion src/app/_components/BlockList/BlockAndMicroblocksItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const BlockAndMicroblocksItem: React.FC<{ block: Block }> = ({ block }) =
return (
<AccordionItem
border={'none'}
borderBottom={'1px solid var(--stacks-colors-border)'}
borderBottom={'1px solid var(--stacks-colors-borderPrimary)'}
_last={{ border: 'none' }}
>
<Flex gap={'6px'}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,27 @@ import pluralize from 'pluralize';
import { memo } from 'react';
import { PiArrowUpRight } from 'react-icons/pi';

import { Circle } from '../../../../common/components/Circle';
import { ExplorerLink } from '../../../../common/components/ExplorerLinks';
import { Flex } from '../../../../ui/Flex';
import { Icon } from '../../../../ui/Icon';
import { Text } from '../../../../ui/Text';
import { Circle } from '../../../common/components/Circle';
import { ExplorerLink } from '../../../common/components/ExplorerLinks';
import { Flex } from '../../../ui/Flex';
import { Icon } from '../../../ui/Icon';
import { Text } from '../../../ui/Text';

export const BlockCount = memo(function ({ count }: { count: number }) {
export const BlockCount = memo(function ({
count,
btcBlockHash,
}: {
count: number;
btcBlockHash?: string;
}) {
// TODO: remove. use theme
const bgColor = useColorModeValue('purple.100', 'slate.900');
const bgColorHover = useColorModeValue('purple.200', 'slate.850');
const textColor = useColorModeValue('purple.600', 'purple.400');
const iconColor = useColorModeValue('purple.600', 'purple.200');
const circleColor = useColorModeValue('white', 'black');
return (
<Flex ml={-3} pb={4} pt={1}>
<ExplorerLink href={'/blocks'}>
<Flex py={3}>
<ExplorerLink href={btcBlockHash ? `btcblock/${btcBlockHash}` : '/blocks'}>
<Text
display={'flex'}
color={textColor}
Expand All @@ -36,7 +42,7 @@ export const BlockCount = memo(function ({ count }: { count: number }) {
}}
>
+{count} {pluralize('block', count)}
<Circle size={4.5} bg={circleColor}>
<Circle size={4.5} bg="surface">
<Icon as={PiArrowUpRight} size={2.5} color={iconColor} />
</Circle>
</Text>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Dispatch, SetStateAction, createContext, useContext } from 'react';

interface BlockListContextType {
isUpdateListLoading: boolean;
setIsUpdateListLoading: Dispatch<SetStateAction<boolean>>;
isBlockListLoading: boolean;
setBlockListLoading: Dispatch<SetStateAction<boolean>>;
groupedByBtc: boolean;
setGroupedByBtc: Dispatch<SetStateAction<boolean>>;
liveUpdates: boolean;
Expand Down
4 changes: 2 additions & 2 deletions src/app/_components/BlockList/BlockListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { BtcStxBlockLinks } from '../../../common/components/BtcStxBlockLinks';
import { TwoColsListItem } from '../../../common/components/TwoColumnsListItem';
import { addSepBetweenStrings, toRelativeTime, truncateMiddle } from '../../../common/utils/utils';
import { Flex, FlexProps } from '../../../ui/Flex';
import { Caption, Text } from '../../../ui/typography';
import { Caption } from '../../../ui/typography';

export const BlockListItem: React.FC<{ block: Block } & FlexProps> = React.memo(
({ block, ...rest }) => {
Expand All @@ -30,7 +30,7 @@ export const BlockListItem: React.FC<{ block: Block } & FlexProps> = React.memo(
</Flex>
),
subtitle: (
<Caption display="block" color={'secondaryText'}>
<Caption display="block" color={'textSubdued'}>
{addSepBetweenStrings([
`${block?.microblocks_accepted?.length || 0} ${pluralize(
'microblock',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ReactNode, useState } from 'react';

import { BlockListContext } from './context';
import { BlockListContext } from './BlockListContext';

export function BlockListProvider({ children }: { children: ReactNode }) {
const [isUpdateListLoading, setIsUpdateListLoading] = useState(false);
Expand All @@ -10,8 +10,8 @@ export function BlockListProvider({ children }: { children: ReactNode }) {
return (
<BlockListContext.Provider
value={{
isUpdateListLoading,
setIsUpdateListLoading,
isBlockListLoading: isUpdateListLoading,
setBlockListLoading: setIsUpdateListLoading,
groupedByBtc,
setGroupedByBtc,
liveUpdates,
Expand Down
71 changes: 71 additions & 0 deletions src/app/_components/BlockList/BlocksPage/BlocksPageBlockList.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
'use client';

import { Suspense, useCallback, useRef } from 'react';

Check warning on line 3 in src/app/_components/BlockList/BlocksPage/BlocksPageBlockList.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/_components/BlockList/BlocksPage/BlocksPageBlockList.tsx#L3

Added line #L3 was not covered by tests

import { Section } from '../../../../common/components/Section';
import { Stack } from '../../../../ui/Stack';
import { ExplorerErrorBoundary } from '../../ErrorBoundary';
import { useBlockListContext } from '../BlockListContext';
import { BlockListProvider } from '../BlockListProvider';
import { Controls } from '../Controls';
import { BlocksPageBlockListGroupedSkeleton } from '../Grouped/skeleton';
import { BlocksPageBlockListGrouped } from './BlocksPageBlockListGrouped';
import { BlocksPageBlockListUngrouped } from './BlocksPageBlockListUngrouped';

Check warning on line 13 in src/app/_components/BlockList/BlocksPage/BlocksPageBlockList.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/_components/BlockList/BlocksPage/BlocksPageBlockList.tsx#L5-L13

Added lines #L5 - L13 were not covered by tests

function BlocksPageBlockListBase() {
const { groupedByBtc, setGroupedByBtc, liveUpdates, setLiveUpdates } = useBlockListContext();

Check warning on line 16 in src/app/_components/BlockList/BlocksPage/BlocksPageBlockList.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/_components/BlockList/BlocksPage/BlocksPageBlockList.tsx#L15-L16

Added lines #L15 - L16 were not covered by tests

const lastClickTimeRef = useRef(0);
const toggleLiveUpdates = useCallback(() => {
const now = Date.now();

Check warning on line 20 in src/app/_components/BlockList/BlocksPage/BlocksPageBlockList.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/_components/BlockList/BlocksPage/BlocksPageBlockList.tsx#L18-L20

Added lines #L18 - L20 were not covered by tests
if (now - lastClickTimeRef.current > 2000) {
lastClickTimeRef.current = now;
setLiveUpdates(!liveUpdates);

Check warning on line 23 in src/app/_components/BlockList/BlocksPage/BlocksPageBlockList.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/_components/BlockList/BlocksPage/BlocksPageBlockList.tsx#L22-L23

Added lines #L22 - L23 were not covered by tests
}
}, [liveUpdates, setLiveUpdates]);

return (
<Section>
<Stack
marginX={-6}
px={6}
borderBottom={liveUpdates ? '1px solid var(--stacks-colors-borderPrimary)' : 'none'}
>
<Controls
groupByBtc={{
onChange: () => {
setGroupedByBtc(!groupedByBtc);

Check warning on line 37 in src/app/_components/BlockList/BlocksPage/BlocksPageBlockList.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/_components/BlockList/BlocksPage/BlocksPageBlockList.tsx#L36-L37

Added lines #L36 - L37 were not covered by tests
},
isChecked: groupedByBtc,
}}
liveUpdates={{
onChange: toggleLiveUpdates,
isChecked: liveUpdates,
}}
horizontal={true}
/>
</Stack>
{groupedByBtc ? <BlocksPageBlockListGrouped /> : <BlocksPageBlockListUngrouped />}
</Section>
);
}

export function BlocksPageBlockList() {

Check warning on line 53 in src/app/_components/BlockList/BlocksPage/BlocksPageBlockList.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/_components/BlockList/BlocksPage/BlocksPageBlockList.tsx#L53

Added line #L53 was not covered by tests
return (
<ExplorerErrorBoundary
Wrapper={Section}
wrapperProps={{
gridColumnStart: ['1', '1', '2'],
gridColumnEnd: ['2', '2', '3'],
minWidth: 0,
}}
tryAgainButton
>
<Suspense fallback={<BlocksPageBlockListGroupedSkeleton />}>
<BlockListProvider>
<BlocksPageBlockListBase />
</BlockListProvider>
</Suspense>
</ExplorerErrorBoundary>
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
'use client';

import { Suspense } from 'react';

Check warning on line 3 in src/app/_components/BlockList/BlocksPage/BlocksPageBlockListGrouped.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/_components/BlockList/BlocksPage/BlocksPageBlockListGrouped.tsx#L3

Added line #L3 was not covered by tests

import { ListFooter } from '../../../../common/components/ListFooter';
import { Section } from '../../../../common/components/Section';
import { Box } from '../../../../ui/Box';
import { Flex } from '../../../../ui/Flex';
import { ExplorerErrorBoundary } from '../../ErrorBoundary';
import { useBlockListContext } from '../BlockListContext';
import { BlockListGrouped } from '../Grouped/BlockListGrouped';
import { BlocksPageBlockListGroupedSkeleton } from '../Grouped/skeleton';
import { UpdateBar } from '../UpdateBar';
import { useBlocksPageBlockListGrouped } from '../data/useBlocksPageBlockListGrouped';

Check warning on line 14 in src/app/_components/BlockList/BlocksPage/BlocksPageBlockListGrouped.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/_components/BlockList/BlocksPage/BlocksPageBlockListGrouped.tsx#L5-L14

Added lines #L5 - L14 were not covered by tests

function BlocksPageBlockListGroupedBase() {
const { liveUpdates } = useBlockListContext();

Check warning on line 17 in src/app/_components/BlockList/BlocksPage/BlocksPageBlockListGrouped.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/_components/BlockList/BlocksPage/BlocksPageBlockListGrouped.tsx#L16-L17

Added lines #L16 - L17 were not covered by tests
const { blockList, updateBlockList, isFetchingNextPage, hasNextPage, fetchNextPage } =
useBlocksPageBlockListGrouped();

Check warning on line 19 in src/app/_components/BlockList/BlocksPage/BlocksPageBlockListGrouped.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/_components/BlockList/BlocksPage/BlocksPageBlockListGrouped.tsx#L19

Added line #L19 was not covered by tests

return (
<>
{!liveUpdates && <UpdateBar blockList={blockList} onClick={updateBlockList} />}
<Flex flexDirection="column" gap={4} pt={4}>
<BlockListGrouped blockList={blockList} minimized={false} stxBlocksLimit={10} />
</Flex>
<Box pt={5} pb={5}>
{!liveUpdates && (
<ListFooter
isLoading={isFetchingNextPage}
hasNextPage={hasNextPage}
fetchNextPage={fetchNextPage}
label={'blocks'}
/>
)}
</Box>
</>
);
}

export function BlocksPageBlockListGrouped() {

Check warning on line 41 in src/app/_components/BlockList/BlocksPage/BlocksPageBlockListGrouped.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/_components/BlockList/BlocksPage/BlocksPageBlockListGrouped.tsx#L41

Added line #L41 was not covered by tests
return (
<ExplorerErrorBoundary
Wrapper={Section}
wrapperProps={{
gridColumnStart: ['1', '1', '2'],
gridColumnEnd: ['2', '2', '3'],
minWidth: 0,
}}
tryAgainButton
>
<Suspense fallback={<BlocksPageBlockListGroupedSkeleton />}>
<BlocksPageBlockListGroupedBase />
</Suspense>
</ExplorerErrorBoundary>
);
}
Loading
Loading