Skip to content

Commit

Permalink
Update index.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
ggsawatyanon committed Oct 2, 2023
1 parent 6970c5e commit f7184ef
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions frontend/src/components/utils/NavBar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,17 @@ function GetButtonColor(lab: string) {
: 'primary';
}

/**
* NavBar Component
*
* This component is the navigation bar that is used on all pages throughout the CUApts website. It provides routing to the Home and FAQ pages
* and the Login/Sign Out buttons.
* @param headersData: An array of objects representing navigation links. Each object should have label (string) and href (string) properties.
* @param user: (firebase.User | null) The current user object, can be null if the user is not authenticated.
* @param setUser: function to set user.
* @returns the NavBar component.
*/

const NavBar = ({ headersData, user, setUser }: Props): ReactElement => {
const initialUserState = !user ? 'Sign In' : 'Sign Out';
const [buttonText, setButtonText] = useState(initialUserState);
Expand Down

0 comments on commit f7184ef

Please sign in to comment.