[0.2.0] Page scrolling to <ReactTypeformEmbed /> component on load. Any workarounds? #27
Description
Howdy!
On page load we're taken all the way to the bottom of the page and the user has to scroll all the way up. (So I position my ReactTypeformEmbed at the very bottom of the page, and then the user is scrolled to that component not after the component is loaded (tried fixing with a setScroll on the componentWillMount function), but after the (embedded) typeform pagee loads.
Here's a snippit for context:
<div className={classNames(classes.main, classes.mainRaised)}>
<div className={classes.container}>
<ScrollableAnchor id={"about-us"}>
<SectionAboutUs />
</ScrollableAnchor>
<SectionTeam style={{ marginTop: "-150px" }} />
<ScrollableAnchor id={"faq"}>
<SectionFAQ />
</ScrollableAnchor>
<ScrollableAnchor id={"schedule"}>
<SectionSchedule />
</ScrollableAnchor>
<SectionSponsors />
<ScrollableAnchor>
<SectionWork /> {/* <ReactTypeformEmbed LIVES HERE!!! /> */}
</ScrollableAnchor>
</div>
</div>
Full source for that page found here: https://github.com/MarioLopezBaylor/wacode-site/blob/master/src/views/LandingPage/LandingPage.jsx
And here's the render function from the component:
render() {
const { classes } = this.props;
return (
<div className={classes.section}>
<GridContainer
justify="center"
style={{ height: "475px", width: "100%" }}
>
<GridItem cs={12} sm={8} md={8}>
<h2 className={classes.title}>Work with us</h2>
<h4 className={classes.description}>
Wacode is looking for sponsors and community partners. We want to
find business and organizations who believe and support our
mission of bringing technology to our local community, and
providing a platform for our flourishing tech community.
</h4>
<ReactTypeformEmbed
popup={false}
url="https://wacodeteam.typeform.com/to/mpK8Ns"
/>
</GridItem>
</GridContainer>
</div>
);
}
Full source for this other component found here: https://github.com/MarioLopezBaylor/wacode-site/blob/master/src/views/LandingPage/Sections/SectionWork.jsx
If you need more context, here's the full repo: https://github.com/MarioLopezBaylor/wacode-site
Maybe I'm being dumb about this? Let me know.
Thanks for looking into it!