3Dshock/client/src/components/ScrollToTop.tsx
E c975432b73 🌫🎲🎰🎇📟🎏
2021-03-10 22:33:06 -07:00

24 lines
385 B
TypeScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { Button } from 'antd'
import React from 'react'
export const ScrollToTop = () => {
const handleClick = () => {
window.scrollTo(0, 0)
console.log('')
}
return (
<Button
type="link"
style={{
position: 'fixed',
right: 20,
bottom: 20,
}}
onClick={handleClick}
>
Scroll To Top
</Button>
)
}