redirection and merge resolve (fix #113)
This commit will add - redirections to behaviour page - resolving a merge conflict
This commit is contained in:
parent
ab95b0dfd5
commit
15b2697622
4 changed files with 22 additions and 3 deletions
14
frontend/src/components/pages/Behavior.js
Normal file
14
frontend/src/components/pages/Behavior.js
Normal file
|
@ -0,0 +1,14 @@
|
|||
import React from "react";
|
||||
import "../../App.css";
|
||||
import Footer from "../../Footer";
|
||||
|
||||
export default function Behavior() {
|
||||
return (
|
||||
<>
|
||||
<div className="sitePage">
|
||||
<h1>Studie Verhaltensmerkmale</h1>
|
||||
</div>
|
||||
<Footer />
|
||||
</>
|
||||
);
|
||||
}
|
|
@ -4,6 +4,7 @@ import "../../App.css";
|
|||
import Footer from "../../Footer";
|
||||
import InputField from "../InputField";
|
||||
import SubmitField from "../SubmitField";
|
||||
import { Redirect } from "react-router";
|
||||
import { login, useAuth, logout } from "../../auth/AuthProvider";
|
||||
import Secret from "./Secret";
|
||||
import ErrorMessage from "../ErrorMessage";
|
||||
|
@ -71,8 +72,7 @@ export default function Login() {
|
|||
</form>
|
||||
) : (
|
||||
<>
|
||||
<Secret />
|
||||
<button onClick={() => logout()}>Logout</button>
|
||||
<Redirect to="/behavior" />
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
|
|
|
@ -8,6 +8,7 @@ import SubmitField from "../SubmitField";
|
|||
import { authFetch } from "../../auth/AuthProvider";
|
||||
import ErrorMessage from "../ErrorMessage";
|
||||
import { Link } from "react-router-dom";
|
||||
import { Redirect } from "react-router";
|
||||
|
||||
export default function Umfrage() {
|
||||
/* values from survey */
|
||||
|
@ -218,7 +219,7 @@ export default function Umfrage() {
|
|||
{!isSurveyValidBackend ? (
|
||||
<ErrorMessage message={backendErrorMessage} />
|
||||
) : (
|
||||
<p>{backendSuccessMessage}</p>
|
||||
<Redirect to="/behavior" />
|
||||
)}
|
||||
</div>
|
||||
<Footer />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue