import React, { Component } from 'react';
import QueueAnim from 'rc-queue-anim';
import Instance from '../../../components/Connection';

class Page extends React.Component {
  constructor(props) {
    super(props);
    this.props = props;

    Instance.getRawConn().post('/v1/ext/' + this.props.params.ride_uuid + '/' + this.props.params.user_uuid + '/ready').then(res => {
      location.href = `/#/ride/${res.data.ride_uuid}/${res.data.user.useruuid}`;
    }).catch(console.error);
  }

  render() {
    return (
      <section className="chapter">
        <QueueAnim type="top" className="ui-animate">
        </QueueAnim>
      </section>
    );
  }
};

module.exports = Page;