Skip to content

Commit 34217ae

Browse files
refactor(staking-home-table-of-contents): remove isActive prop and logic
1 parent e9ab3b7 commit 34217ae

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

src/components/Staking/StakingHomeTableOfContents.tsx

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,11 @@ const TableOfContentsLink: React.FC<ITableOfContentsLinkProps> = ({
1616
item: { id, title },
1717
}) => {
1818
const url = `#${id}`
19-
let isActive = false
20-
if (typeof window !== `undefined`) {
21-
isActive = window.location.hash === url
22-
}
23-
// const isNested = depth === 2
24-
let classes = "nested"
25-
if (isActive) {
26-
classes += " active"
27-
}
19+
2820
return (
2921
<Link
3022
as={GatsbyLink}
3123
to={url}
32-
className={classes}
3324
position="relative"
3425
display="inline-block"
3526
color="text300"

0 commit comments

Comments
 (0)