We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
isActive
1 parent e9ab3b7 commit 34217aeCopy full SHA for 34217ae
src/components/Staking/StakingHomeTableOfContents.tsx
@@ -16,20 +16,11 @@ const TableOfContentsLink: React.FC<ITableOfContentsLinkProps> = ({
16
item: { id, title },
17
}) => {
18
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
+
28
return (
29
<Link
30
as={GatsbyLink}
31
to={url}
32
- className={classes}
33
position="relative"
34
display="inline-block"
35
color="text300"
0 commit comments