From 7a849094f01d7902fc4b79ee9696f022a54afcc9 Mon Sep 17 00:00:00 2001 From: sontrinh16 Date: Wed, 8 Jan 2025 16:50:05 +0700 Subject: [PATCH] resolve conflict --- src/components/validators/list.tsx | 60 ++++++++++++++++++++---------- 1 file changed, 40 insertions(+), 20 deletions(-) diff --git a/src/components/validators/list.tsx b/src/components/validators/list.tsx index a7ec3466ff..8fb27cfb4a 100644 --- a/src/components/validators/list.tsx +++ b/src/components/validators/list.tsx @@ -6,13 +6,13 @@ import { Button, Tabs, VStack, + Skeleton, Link, useBreakpointValue, Flex, Center, Grid, StackSeparator, - Skeleton } from "@chakra-ui/react"; import { ProgressBar, ProgressRoot } from "@/components/ui/progress"; import { useValidators } from "./hooks"; @@ -28,17 +28,11 @@ import SearchValidator from "./search"; import { fetchColumns } from "./utils"; import ColumnHeader from "./header"; -const SkeletonValidatorItems = ({ rowCount = 30, columnCount = 6 }) => { +const SkeletonValidatorItems = ({ rowCount = 30 }) => { return ( <> {Array.from({ length: rowCount }).map((_, rowIndex) => ( - - {Array.from({ length: columnCount }).map((_, colIndex) => ( - - - - ))} - + ))} ); @@ -115,6 +109,31 @@ const ValidatorItemMobile = ({ item }) => { ); }; +const SkeletonItem = () => { + return ( + + + + + + + + + + + + + + + + + + + + + ) +} + const ValidatorItem = ({ item, idx }) => { const { t } = useTranslation("validators"); const status = getValidatorStatus(item.status, item.jailed, item.tombstoned); @@ -288,18 +307,19 @@ const ValidatorList = () => { borderRadius: "xl", }} > - {!state.loading ? items.map((val, idx) => ( - - )) : ( - Array.from({ length: 20 }).map(() => ( - - ) + {state.loading ? ( + <> + + + ) : ( + items.map((val, idx) => ( + )) - } + )}