import { h, Component } from 'preact'; import PropTypes from 'prop-types'; import Navigation from './Navigation'; import SlideContent from './SlideContent'; import { getContentOfToken } from '../utilities'; class IntroSlide extends Component { constructor(props) { super(props); this.onSubmit = this.onSubmit.bind(this); } componentDidMount() { const csrfToken = getContentOfToken('csrf-token'); fetch('/onboarding_update', { method: 'PATCH', headers: { 'X-CSRF-Token': csrfToken, 'Content-Type': 'application/json', }, body: JSON.stringify({ user: { last_onboarding_page: 'intro slide' } }), credentials: 'same-origin', }); } onSubmit() { const { next } = this.props; next(); } selectVariant(variantId) { this.defaultVariant = (
DEV is where programmers share ideas and help each other grow. 🤓
Ask questions, leave helpful comments, encourage others, and have fun! 🙌
A few {' '} quick questions {' '} for you before you get started...
community!