Skip to content

Commit 67d6785

Browse files
committed
login comp2
1 parent 0ad837d commit 67d6785

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

src/App.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,13 @@ const App = () => {
5050
useEffect(() => {
5151
checkLogin();
5252
}, [checkCookie, updateSession]);
53+
/**
54+
* checks if user was already logged in, and navigates them to home if cookie was already set
55+
* @method
56+
* @async
57+
* @params none
58+
* @returns {Promise<void>} navigates user to endpoint /home if they were logged in
59+
*/
5360

5461
const navigateToHome = async () => {
5562
await checkLogin();

src/components/Login/Login.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ const Login = (props: loginProps): JSX.Element => {
3636
authenticateUser(username, password);
3737
};
3838

39-
/*
40-
authenticates users username and password
41-
@method
42-
@async
43-
@returns promise when sending a request to backend to login is successful, and updates users session and cookies
39+
/** authenticates users username and password
40+
* @method
41+
* @async
42+
* @returns {Promise<void>} returns promise when sending a request to backend to login is successful, and updates users session and cookies
4443
*/
44+
4545
const authenticateUser = async (
4646
username: string,
4747
password: string

src/components/Metrics/Metrics.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const Metrics = (): JSX.Element => {
1111
const button = kubernetesOrNah === 1 ? 'Containers' : 'Kubernetes Cluster';
1212

1313
useEffect(() => {
14-
/*
14+
/**
1515
* Retrieves the API and UID key
1616
* @method
1717
* @async

0 commit comments

Comments
 (0)