Docs and format: Update documentation for hooks and format code

Docs: begin work on updating documentation for hooks
This commit is contained in:
Aaron William Po
2023-05-03 00:07:24 -04:00
parent 196d09161a
commit 1971959ea4
16 changed files with 144 additions and 60 deletions

View File

@@ -3,9 +3,12 @@ import { useRouter } from 'next/router';
import { useContext } from 'react';
/**
* Custom React hook that redirects the user to the home page if they are logged in. This
* hook is used to prevent logged in users from accessing the login and signup pages. Must
* be used under the UserContext provider.
* Custom React hook that redirects the user to the home page if they are logged in.
*
* This hook is used to prevent logged in users from accessing the login and signup pages
* by redirecting them to the home page.
*
* This hook should only be used in a component that is under the UserContext provider.
*
* @returns {void}
*/