diff options
Diffstat (limited to '')
| -rw-r--r-- | client/src/ui/Menu.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/client/src/ui/Menu.js b/client/src/ui/Menu.js index f3e912d..a91b188 100644 --- a/client/src/ui/Menu.js +++ b/client/src/ui/Menu.js @@ -1,7 +1,8 @@ import { h, Fragment } from 'preact'; import { useState } from 'preact/hooks'; import cn from 'classnames'; -import { useUser, useUserCtx } from '../user'; +import { useDispatch } from '../actions'; +import { useUser } from '../user'; import css from './css'; css` @@ -93,7 +94,8 @@ div.menu div.user { `; const UserMenu = () => { const [showLogin, setLogin] = useState(false); - const { state: { user }, dispatch } = useUserCtx(); + const { user } = useUser(); + const dispatch = useDispatch(); if (showLogin) { return ( |
