Skip to content

Commit 6c90dff

Browse files
SoheilTylerAPfledderer
andauthored
Apply suggestions from code review
Co-authored-by: Tyler Pfledderer <tyler.pfledderer@gmail.com>
1 parent db09e20 commit 6c90dff

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/components/Staking/StakingStatsBox.tsx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@ import React, { useState, useEffect, ReactNode } from "react"
33
import { useIntl } from "react-intl"
44
import {
55
Code,
6-
Divider,
76
Flex,
87
Icon,
98
Spinner,
10-
useBreakpointValue,
119
VStack,
1210
} from "@chakra-ui/react"
1311
// Import components
@@ -27,20 +25,24 @@ const MAX_EFFECTIVE_BALANCE = 32
2725

2826
const Cell: React.FC<{ children: ReactNode }> = ({ children }) => {
2927
return (
30-
<VStack spacing={2} py={4} px={8}>
28+
<VStack
29+
spacing={2}
30+
py={4}
31+
px={8}
32+
borderLeft={{ md: "1px" }}
33+
borderTop={{ base: "1px", md: "none" }}
34+
// `!important` needed to force an override of the user-agent
35+
borderColor="preBorder !important"
36+
_first={{
37+
borderLeft: "none",
38+
borderTop: "none",
39+
}}
40+
>
3141
{children}
3242
</VStack>
3343
)
3444
}
3545

36-
const CellDivider = () => {
37-
// Hook needed because the `orientation` prop does not directly accept responsive values
38-
const orientation = useBreakpointValue<"horizontal" | "vertical">({
39-
base: "horizontal",
40-
md: "vertical",
41-
})
42-
return <Divider borderColor="preBorder" orientation={orientation} />
43-
}
4446

4547
const Value: React.FC<{ children: ReactNode; title: string }> = ({
4648
children,
@@ -161,7 +163,6 @@ const StakingStatsBox: React.FC<IProps> = () => {
161163
<BeaconchainTooltip />
162164
</Label>
163165
</Cell>
164-
<CellDivider />
165166
<Cell>
166167
{totalValidators === ZERO ? (
167168
<Spinner />
@@ -175,7 +176,6 @@ const StakingStatsBox: React.FC<IProps> = () => {
175176
<BeaconchainTooltip />
176177
</Label>
177178
</Cell>
178-
<CellDivider />
179179
<Cell>
180180
{currentApr === ZERO ? (
181181
<Spinner />

0 commit comments

Comments
 (0)