Last active
November 25, 2018 12:04
-
-
Save productioncoder/f5a3671c6b4e2977a5a36a9a074d02e3 to your computer and use it in GitHub Desktop.
Youtube in React: enforce scrolling to top in AppLayout component
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import './AppLayout.scss'; | |
import HeaderNav from '../../containers/HeaderNav/HeaderNav'; | |
import ScrollToTop from '../ScrollToTop/ScrollToTop'; | |
export function AppLayout(props) { | |
return ( | |
<ScrollToTop> | |
<div className='app-layout'> | |
<HeaderNav/> | |
{props.children} | |
</div> | |
</ScrollToTop> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment