fix select bridge
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import { useEffect } from 'react'
|
||||
import { useLocation } from 'react-router-dom'
|
||||
import { About } from '@widgets/about'
|
||||
import { Converter } from '@widgets/currency-converter'
|
||||
import { Footer } from '@widgets/footer'
|
||||
@@ -6,6 +8,16 @@ import { Hero } from '@widgets/hero'
|
||||
import { NetworksTable } from '@widgets/networks-table'
|
||||
|
||||
export function HomePage() {
|
||||
const location = useLocation()
|
||||
|
||||
useEffect(() => {
|
||||
if ((location.state as { scrollTo?: string } | null)?.scrollTo === 'about') {
|
||||
requestAnimationFrame(() => {
|
||||
document.getElementById('about')?.scrollIntoView({ behavior: 'smooth' })
|
||||
})
|
||||
}
|
||||
}, [location.state])
|
||||
|
||||
return (
|
||||
<>
|
||||
<Header />
|
||||
|
||||
Reference in New Issue
Block a user