-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PIR-23, PIR-76, PIR-1106, PIR-1107, PIR-1108, PIR-1111: Users, Grids,…
… Boards, Firebase Database Init
- Loading branch information
rakib
committed
Feb 14, 2025
1 parent
fadb052
commit 6ffadb2
Showing
40 changed files
with
3,713 additions
and
536 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
import { useContext } from 'react'; | ||
import { StateContext } from '../pages/_app'; | ||
|
||
export default function AuthState({ classes }: any) { | ||
let { user, authState } = useContext<any>(StateContext); | ||
export default function AuthState({ classes, nextOverride = ``, hideOnUsersLoading = false }: any) { | ||
let { user, authState, usersLoading } = useContext<any>(StateContext); | ||
return ( | ||
<span className={`${classes} textOverflow extended`} style={{minWidth: `fit-content`}}> | ||
{user != null ? ( | ||
`Welcome, ${user?.name}` | ||
) : authState} | ||
</span> | ||
hideOnUsersLoading == true && usersLoading ? <></> : ( | ||
<span className={`${classes} textOverflow extended`} style={{minWidth: `fit-content`}}> | ||
{user != null ? ( | ||
`Welcome, ${user?.name}` | ||
) : (nextOverride != `` && authState == `Next`) ? nextOverride : authState} | ||
</span> | ||
) | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.