Skip to content
This repository was archived by the owner on Apr 5, 2024. It is now read-only.

Commit d29502f

Browse files
committed
Fixed some errors
1 parent 102d9c1 commit d29502f

File tree

4 files changed

+18
-7
lines changed

4 files changed

+18
-7
lines changed

webapp_frontend/src/background/api/registration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const registerNewUser = (username: string, password: string, passwordConf
2424
}
2525
};
2626

27-
return Axios.get(hostname +'/users' + "/register", config)
27+
return Axios.get(hostname +'/users/register', config)
2828
.then((data:AxiosResponse<object>) => {
2929
console.log(data.status + ": " + data.statusText);
3030
alert(data.status + ": " + data.statusText);

webapp_frontend/src/components/basicElements/Footer.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@ import React, {ReactElement} from 'react';
33
export default function Footer():ReactElement {
44
return(
55
<div>
6-
Footer
6+
<table>
7+
<tr>
8+
<td>Footer</td>
9+
<td>Footer</td>
10+
</tr>
11+
</table>
712
</div>
813
);
914
}
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
import React, {ReactElement} from 'react';
2+
import { useHistory } from "react-router-dom";
3+
import {Button} from "react-bootstrap";
24

35
function Header():ReactElement {
4-
return(<div></div>)
6+
const history = useHistory();
7+
8+
return(<div><Button onClick={() => history.push("/registration")}>Registration</Button><Button onClick={() => history.push("/")}>Main</Button></div>)
59
}
610

711
export default Header;

webapp_frontend/src/components/pages/Registration.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,12 @@ export default function Registration(): ReactElement {
4747
}
4848

4949
const handleAlertVisibility = (duration: number) => {
50-
setAlertVisibility(true);
51-
setTimeout(() => {
52-
setAlertVisibility(false)
53-
}, duration)
50+
if (!alertVisibility) {
51+
setAlertVisibility(true);
52+
setTimeout(() => {
53+
setAlertVisibility(false)
54+
}, duration)
55+
}
5456
}
5557

5658
const handlePasswordChange = (event: ChangeEvent<HTMLInputElement>) => {

0 commit comments

Comments
 (0)