Compare commits
No commits in common. "21c0a7a3a0e7e3726498e3068fba74d7c38471ac" and "d03c01e3a96bdba99c1e82d45ebeb75cac2a4217" have entirely different histories.
21c0a7a3a0
...
d03c01e3a9
@ -5,16 +5,9 @@ import { usePathname } from 'next/navigation'
|
||||
export default function FloatBtn() {
|
||||
const pathname = usePathname()
|
||||
|
||||
const scrollToTop = () => {
|
||||
window.scrollTo({
|
||||
top: 0,
|
||||
behavior: 'smooth',
|
||||
})
|
||||
}
|
||||
|
||||
if (pathname === '/login' || pathname === '/') {
|
||||
return null
|
||||
}
|
||||
|
||||
return <button className="top-btn" onClick={scrollToTop}></button>
|
||||
return <button className="top-btn"></button>
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user