Skip to content

Commit

Permalink
Merge branch 'main' into documentation-apartment-page
Browse files Browse the repository at this point in the history
  • Loading branch information
thuypham03 authored Oct 9, 2023
2 parents d3fbd3a + 7394b67 commit 53ba4ee
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 53ba4ee

Please sign in to comment.