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.
1 parent 4bad805 commit 39bc804Copy full SHA for 39bc804
browser/src/DataPage/DataPage.tsx
@@ -1,4 +1,4 @@
1
-import React from 'react'
+import React, { useEffect } from 'react'
2
import styled from 'styled-components'
3
4
import { Badge, ExternalLink, PageHeading } from '@gnomad/ui'
@@ -53,6 +53,16 @@ const DataPage = () => {
53
// Load stylesheet to make smooth scroll behavior active
54
const _style = styles.html
55
56
+ useEffect(() => {
57
+ const hash = window.location.hash
58
+ if (hash !== '') {
59
+ const element = document.querySelector(`${hash}`)
60
+ if (element) {
61
+ element.scrollIntoView()
62
+ }
63
64
+ }, [])
65
+
66
return (
67
<InfoPage>
68
<DocumentTitle title="Data" />
0 commit comments