diff --git a/frontend/src/App/App.jsx b/frontend/src/App/App.jsx index 415df93781..578fbbe27b 100644 --- a/frontend/src/App/App.jsx +++ b/frontend/src/App/App.jsx @@ -1,12 +1,12 @@ import React from 'react'; -import { Router, Route } from 'react-router-dom'; +import { Router, Route, Redirect } from 'react-router-dom'; import { history } from '@/_helpers'; import { authenticationService, tooljetService } from '@/_services'; import { PrivateRoute } from '@/_components'; import { HomePage } from '@/HomePage'; import { LoginPage } from '@/LoginPage'; import { SignupPage } from '@/SignupPage'; -import { InvitationPage } from '@/InvitationPage'; +import { ConfirmationPage } from '@/ConfirmationPage'; import { Authorize } from '@/Oauth2'; import { Authorize as Oauth } from '@/Oauth'; import { Editor, Viewer } from '@/Editor'; @@ -118,7 +118,18 @@ class App extends React.Component { - + ( + + )} + /> + { e.preventDefault(); - const token = this.props.match.params.token; + const token = this.props.location.state.token; const { password, organization, role, newSignup, firstName, lastName, password_confirmation } = this.state; this.setState({ isLoading: true }); @@ -203,4 +203,4 @@ class InvitationPage extends React.Component { } } -export { InvitationPage }; +export { ConfirmationPage }; diff --git a/frontend/src/ConfirmationPage/index.js b/frontend/src/ConfirmationPage/index.js new file mode 100644 index 0000000000..095a93bcd2 --- /dev/null +++ b/frontend/src/ConfirmationPage/index.js @@ -0,0 +1 @@ +export * from './ConfirmationPage'; diff --git a/frontend/src/InvitationPage/index.js b/frontend/src/InvitationPage/index.js deleted file mode 100644 index cdca7c9f1d..0000000000 --- a/frontend/src/InvitationPage/index.js +++ /dev/null @@ -1 +0,0 @@ -export * from './InvitationPage';