import { h, Component } from 'preact'; import PropTypes from 'prop-types'; import { updateOnboarding } from '../utilities'; class ClosingSlide extends Component { componentDidMount() { updateOnboarding('closing slide'); } render() { const { previousLocation, variant } = this.props; const previousLocationListElement = () => { if (variant === '6' || variant === '8') { return (
{' '} Challenge: Leave 3 constructive comments today {' '}
); } if (previousLocation !== 'none' && previousLocation !== null && !previousLocation.startsWith('javascript')) { return (
Or go back to the page you were on before you signed up
{previousLocation}
); } return null; }; const nextStepLinks = () => { if (variant === '7' || variant === '8') { return (
Join the Welcome Thread

😊

); } if (variant === '9') { return (
Join the Welcome Thread 🚀

Challenge: Leave 3 constructive comments

Ask questions, offer encouragement and participate in discussion threads.

); } return (
Join the Welcome Thread

😊

Write your first DEV post

✍️

Read all-time top posts

🤓

Customize your profile

💅

); }; return (

You‘re part of the community! {' '} 🎉

What next?

{nextStepLinks()} {previousLocationListElement()}
); } } ClosingSlide.propTypes = { previousLocation: PropTypes.string.isRequired, variant: PropTypes.string.isRequired, }; export default ClosingSlide;