Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export default class LandingPage extends Component {
- constructor(props) {
- super(props)
- this.toStartRef = createRef()
- }
- componentDidMount() {
- window.addEventListener('scroll', this.handleScroll);
- }
- componentWillUnmount() {
- window.removeEventListener('scroll', this.handleScroll);
- }
- // Show to start button when scrolling down
- handleScroll = (event) => {
- if (event.currentTarget.pageYOffset > 300){
- }
- else{
- }
- }
- // Hadling click on to start button
- onStartClick = (event) => {
- window.scrollTo({
- top: 0,
- behavior: 'smooth',
- })
- }
- render() {
- return (
- <div className="container-fluid p-0">
- <Navbar />
- //вот компонента
- <ToStartButton />
- <AboutProjectSection />
- <AboutMeSection />
- <MyProjectsSection />
- <GithubSection />
- <MyResumeSection />
- <MyContactsSection />
- </div>
- );
- }
- }
- class ToStartButton extends Component {
- render() {
- return (
- <div className="to-start-button" style={{display:'none'}} >
- <img src="https://img.icons8.com/wired/64/000000/circled-chevron-up.png" />
- </div>
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment