message: update FAQ page with auto scroll
diff: @@ -53,16 +53,22 @@ const Faq = ({ defaultLang }: { defaultLang: string }) => {
  question11: null,
  })
  - const goToSection = (name, index) => {
  - if (sectionsRef.current[`question${index + 1}`]) {
  - sectionsRef.current[`question${index + 1}`].scrollIntoView({
  + const goToSection = name => {
  + const filterName = name.replace(/[^\w\s]| /g, "")
  + const path = links.findIndex(
  + ({ en: { title } }) =>
  + title.replace(/[^\w\s]| /g, "").toLowerCase() ===
  + filterName.toLowerCase()
  + )
  +
  + if (sectionsRef.current[`question${path + 1}`]) {
  + sectionsRef.current[`question${path + 1}`].scrollIntoView({
  behavior: "smooth",
  })
  }
  const url = window.location.href
  const hashIndex = url.indexOf("#")
  - const filterName = name.replace(/[^\w\s]| /g, "")
  if (hashIndex < 0) {
  history.pushState({}, null, `${url}#${filterName}`)
  @@ -70,8 +76,6 @@ const Faq = ({ defaultLang }: { defaultLang: string }) => {
  history.pushState({}, null, `${url.substr(0, hashIndex)}#${filterName}`)
  }
  - const path = links.findIndex(({ en: { title } }) => title === name)
  -
  if (path > -1) {
  sectionsRef.current[`question${path}`].scrollIntoView({
  behavior: "smooth",
  @@ -79,7 +83,10 @@ const Faq = ({ defaultLang }: { defaultLang: string }) => {
  }
  }
  - console.log(links)
  + React.useEffect(() => {
  + if (location.hash)
  + setTimeout(() => goToSection(location.hash.substr(1)), 10)
  + }, [])
  return (
  <Container>
  