Signup and login: link to eachother.

master
Tom Hacohen 4 years ago
parent 6970ebc503
commit 835367ba9f

@ -23,6 +23,7 @@ import { startTask } from "./helpers";
import { Switch, Route } from "react-router"; import { Switch, Route } from "react-router";
import { routeResolver } from "./App"; import { routeResolver } from "./App";
import SignupPage from "./SignupPage"; import SignupPage from "./SignupPage";
import { Link } from "react-router-dom";
export default function LoginGate() { export default function LoginGate() {
@ -78,7 +79,8 @@ export default function LoginGate() {
/> />
<Route> <Route>
<Container style={{ maxWidth: "30rem" }}> <Container style={{ maxWidth: "30rem" }}>
<h2>Please Log In</h2> <h2 style={{ marginBottom: "0.1em" }}>Log In</h2>
<div style={{ fontSize: "90%" }}>or <Link to={routeResolver.getRoute("signup")}>create an account</Link></div>
<LoginForm <LoginForm
onSubmit={onFormSubmit} onSubmit={onFormSubmit}
loading={loading} loading={loading}

@ -23,6 +23,7 @@ import { useCredentials } from "./credentials";
import { useDispatch } from "react-redux"; import { useDispatch } from "react-redux";
import { startTask } from "./helpers"; import { startTask } from "./helpers";
import { login } from "./store/actions"; import { login } from "./store/actions";
import { Link } from "react-router-dom";
interface FormErrors { interface FormErrors {
errorUsername?: string; errorUsername?: string;
@ -147,7 +148,8 @@ export default function SignupPage() {
return ( return (
<Container style={{ maxWidth: "30rem" }}> <Container style={{ maxWidth: "30rem" }}>
<h2>Signup</h2> <h2 style={{ marginBottom: "0.1em" }}>Signup</h2>
<div style={{ fontSize: "90%" }}>or <Link to={routeResolver.getRoute("home")}>log in to your account</Link></div>
<form style={styles.form} onSubmit={signup}> <form style={styles.form} onSubmit={signup}>
<TextField <TextField
type="text" type="text"

Loading…
Cancel
Save