Skip to content

Commit

Permalink
Update Header.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
aelassas committed Apr 6, 2024
1 parent 9005588 commit 020b6d0
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions mobile/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ import { useGlobalContext, GlobalContextType } from '../context/GlobalContext'
import * as NotificationService from '../services/NotificationService'

interface HeaderProps {
title?: string
hideTitle?: boolean
loggedIn?: boolean
reload?: boolean
_avatar?: string | null
title?: string,
hideTitle?: boolean,
loggedIn?: boolean,
reload?: boolean,
_avatar?: string | null,
}

const Header = ({ title,
Expand All @@ -26,9 +26,10 @@ const Header = ({ title,
_avatar
}: HeaderProps) => {
const navigation = useNavigation<NativeStackNavigationProp<StackParams, keyof StackParams>>()
const [avatar, setAvatar] = useState<string | null | undefined>(null)
const { notificationCount, setNotificationCount } = useGlobalContext() as GlobalContextType

const [avatar, setAvatar] = useState<string | null | undefined>(null)

useEffect(() => {
const init = async () => {
const currentUser = await UserService.getCurrentUser()
Expand Down

0 comments on commit 020b6d0

Please sign in to comment.