Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const DashboardContainer = () => {
- const { state } = useContext(SpotifyDataContext);
- const windowWidth = useWindowSize();
- return (
- <Dashboard>
- <Header />
- <div className="body" id="body">
- {windowWidth.width > 900 ? <Sidebar /> : null}
- <ContentWrapper>
- <TimerangeBar></TimerangeBar>
- {windowWidth.width < 900 ? <MobileSidebar /> : null}
- {/* This KEY seems like a hack. However i didn't manage to find another way.*/}
- <Content type={state.type} timeperiod={state.timeperiod} key={state.type} />
- </ContentWrapper>
- </div>
- </Dashboard>
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement