aboutsummaryrefslogtreecommitdiffstats
path: root/components/Header.js
diff options
context:
space:
mode:
Diffstat (limited to 'components/Header.js')
-rw-r--r--components/Header.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/components/Header.js b/components/Header.js
index 32ec977..87c31e8 100644
--- a/components/Header.js
+++ b/components/Header.js
@@ -7,13 +7,15 @@ import fetchJson from 'helpers/fetchJson'
import { focus, toggleMin, open, close } from 'helpers/windowActions'
import appList from 'configs/appList'
import useSettings from 'hooks/useSettings'
+import useApps from 'hooks/useApps'
import { faTimes } from '@fortawesome/free-solid-svg-icons'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
-const Header = ({ apps, setApps }) => {
+const Header = () => {
const [userMenu, setUserMenu] = useState(false)
const [showApps, setShowApps] = useState(false)
const { user, mutateUser } = useUser()
+ const { apps, setApps } = useApps()
const { t } = useSettings()
const router = useRouter()
@@ -53,7 +55,7 @@ const Header = ({ apps, setApps }) => {
>
<span
style={{
- ...apps.findIndex(a => a.name === app.name) === apps.length - 1 ? { fontWeight: 600 } : {},
+ ...apps.findIndex(a => a && a.name === app.name) === apps.length - 1 ? { fontWeight: 600 } : {},
...app.min ? { color: '#888' } : {}
}}
>