first commit
This commit is contained in:
25
src/routes/ready/components/ridePage.js
Normal file
25
src/routes/ready/components/ridePage.js
Normal file
@@ -0,0 +1,25 @@
|
||||
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;
|
||||
8
src/routes/ready/index.js
Normal file
8
src/routes/ready/index.js
Normal file
@@ -0,0 +1,8 @@
|
||||
module.exports = {
|
||||
path: 'ride/:ride_uuid/:user_uuid/ready',
|
||||
getComponent(nextState, cb) {
|
||||
require.ensure([], (require) => {
|
||||
cb(null, require('./components/ridePage'));
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user