Commit 61f03af2 authored by Vignesh Mohankumar's avatar Vignesh Mohankumar Committed by GitHub

fix: switch to scrollHeight and add less padding (#5600)

* fix: add less padding-top to about

* switch to scroll height

* add-200
parent 5eb1274f
...@@ -16,7 +16,7 @@ const Page = styled.span<{ isDarkMode: boolean; titleHeight: number }>` ...@@ -16,7 +16,7 @@ const Page = styled.span<{ isDarkMode: boolean; titleHeight: number }>`
flex-direction: row; flex-direction: row;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
padding-top: calc(100vh - ${({ titleHeight }) => titleHeight + 72}px); padding-top: calc(100vh - ${({ titleHeight }) => titleHeight + 200}px);
` `
const Panels = styled.div` const Panels = styled.div`
...@@ -126,7 +126,7 @@ export default function About() { ...@@ -126,7 +126,7 @@ export default function About() {
const [titleHeight, setTitleHeight] = useState(0) const [titleHeight, setTitleHeight] = useState(0)
useLayoutEffect(() => { useLayoutEffect(() => {
if (titleRef.current) { if (titleRef.current) {
setTitleHeight(titleRef.current.clientHeight) setTitleHeight(titleRef.current.scrollHeight)
} }
}, []) }, [])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment