({
additionalButtons,
}: HeaderButtonsProps)
| 18 | const Container = classed('div', 'ml-auto flex justify-end gap-3'); |
| 19 | |
| 20 | export function HeaderButtons({ |
| 21 | additionalButtons, |
| 22 | }: HeaderButtonsProps): ReactElement { |
| 23 | const { isLoggedIn, isAuthReady } = useAuthContext(); |
| 24 | const { loadedSettings } = useSettingsContext(); |
| 25 | |
| 26 | if (!isAuthReady || !loadedSettings) { |
| 27 | return <Container />; |
| 28 | } |
| 29 | |
| 30 | if (!isLoggedIn) { |
| 31 | return ( |
| 32 | <Container> |
| 33 | {/* Sits ahead of the Log in / Sign up pair. It keeps its label here |
| 34 | because there is room, but it stays Float (not Primary) so it never |
| 35 | competes with Sign up, which is the CTA that matters logged out. */} |
| 36 | <GetAppButton showLabel /> |
| 37 | <LoginButton |
| 38 | className={{ |
| 39 | container: 'gap-4', |
| 40 | button: 'hidden laptop:block', |
| 41 | }} |
| 42 | /> |
| 43 | </Container> |
| 44 | ); |
| 45 | } |
| 46 | |
| 47 | return ( |
| 48 | <Container> |
| 49 | <HeaderPlusButton /> |
| 50 | <OpportunityEntryButton /> |
| 51 | <QuestHeaderButton /> |
| 52 | {additionalButtons} |
| 53 | <NotificationsBell /> |
| 54 | <ProfileButton className="hidden laptop:flex" /> |
| 55 | </Container> |
| 56 | ); |
| 57 | } |
| 58 | |
| 59 | export default HeaderButtons; |
nothing calls this directly
no test coverage detected