import { h, Component } from 'preact'; import PropTypes from 'prop-types'; import Navigation from './Navigation'; import { getContentOfToken } from '../utilities'; class ClosingSlide extends Component { 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: 'closing slide' } }), credentials: 'same-origin', }); } render() { const { previousLocation, prev, next, variant } = this.props; const previousLocationListElement = () => { if (variant === '6' || variant === '8') { return (
{previousLocation}
);
}
return null;
};
const nextStepLinks = () => {
if (variant === '7' || variant === '8') {
return (
);
}
if (variant === '9') {
return (
);
}
return (
😊
Write your first DEV post✍️
Read all-time top posts🤓
Customize your profile💅