Change URLs format

This commit is contained in:
Paulo Gustavo Veiga 2020-12-11 20:33:02 -08:00
parent bec0c7998c
commit ff5859a704
6 changed files with 16 additions and 16 deletions

View File

@ -54,17 +54,17 @@ const App = () => {
<Router>
<Switch>
<Route exact path="/">
<Redirect to="/c/login" />
<Redirect to="/c/view/login" />
</Route>
<Route path="/c/login" component={LoginPage} />
<Route path="/c/user/registration">
<Route path="/c/view/login" component={LoginPage} />
<Route path="/c/view/registration">
<RegistationPage service={service} />
</Route>
<Route path="/c/user/registrationSuccess" component={RegistrationSuccessPage} />
<Route path="/c/user/resetPassword">
<Route path="/c/view/registration-success" component={RegistrationSuccessPage} />
<Route path="/c/view/forgot-password">
<ForgotPasswordPage service={service} />
</Route>
<Route path="/c/user/forgotPasswordSuccess" component={ForgotPasswordSuccessPage} />
<Route path="/c/view/forgot-password-success" component={ForgotPasswordSuccessPage} />
</Switch>
</Router>
</IntlProvider>

View File

@ -32,8 +32,11 @@ const ForgotPassword = (props: ServiceProps) => {
// Call Service ...
props.service.resetPassword(
email,
() => history.push("/c/user/forgotPasswordSuccess"),
(msg) => { setErrorMsg(msg); setDisableButton(false); }
() => history.push("/c/view/forgot-password-success"),
(msg) => {
setErrorMsg(msg);
setDisableButton(false);
}
);
}

View File

@ -38,7 +38,7 @@ class Header extends React.Component<HeaderProps, HeaderProps> {
return (
<StyledNav>
<StyledDiv>
<Logo><Link to="/" className="header-logo"><img src={String(logo)} alt="logo" /></Link></Logo>
<Logo><Link to="/c/view/login" className="header-logo"><img src={String(logo)} alt="logo" /></Link></Logo>
{text}
{signUpButton}
{signInButton}
@ -57,7 +57,7 @@ const SignInButton = (props: ButtonProps) => {
const style = props.style ? props.style : 'style1';
return (
<span className={`button-${style} ${props.className}`}>
<Link to="/c/login"><FormattedMessage id="login.signin" defaultMessage="Sign In" /></Link>
<Link to="/c/view/login"><FormattedMessage id="login.signin" defaultMessage="Sign In" /></Link>
</span>);
}
@ -65,7 +65,7 @@ const SignUpButton = (props: ButtonProps) => {
const style = props.style ? props.style : 'style1';
return (
<span className={`button-${style} ${props.className}`}>
<Link to="/c/user/registration"><FormattedMessage id="login.signup" defaultMessage="Sign Up" /></Link>
<Link to="/c/view/registration"><FormattedMessage id="login.signup" defaultMessage="Sign Up" /></Link>
</span>);
}

View File

@ -69,7 +69,7 @@ const LoginPage = () => {
</div>
<SubmitButton value={intl.formatMessage({ id: "login.signin", defaultMessage: "Sign In" })} />
</form>
<Link to="/c/user/resetPassword"><FormattedMessage id="login.forgotpwd" defaultMessage="Forgot Password ?" /></Link>
<Link to="/c/view/forgot-password"><FormattedMessage id="login.forgotpwd" defaultMessage="Forgot Password ?" /></Link>
<ConfigStatusMessage enabled='false' />

View File

@ -41,7 +41,7 @@ const RegistrationForm = (props: ServiceProps) => {
// Call Service ...
props.service.registerNewUser(
user,
() => history.push("/c/user/registrationSuccess"),
() => history.push("/c/view/registration-success"),
(msg) => { setErrorMsg(msg); setDisableButton(false); }
);
}

View File

@ -16,7 +16,6 @@ const RegistrationSuccessPage = () => {
return (
<div>
<Header type='none' />
<div>
<PageContent>
<h1>
<FormattedMessage id="resetpassword.success.title" defaultMessage="Your account has been created successfully" />
@ -24,10 +23,8 @@ const RegistrationSuccessPage = () => {
<p>
<FormattedMessage id="registration.success.desc" defaultMessage="Click 'Sign In' button below and start creating mind maps." />
</p>
<SignInButton style='style1' />
</PageContent>
</div>
<Footer />
</div>
);