From eb1e149f1e53aba3abce645a3d7fc982333f3956 Mon Sep 17 00:00:00 2001 From: s-ol Date: Mon, 24 Jan 2022 12:12:22 +0100 Subject: client: replying --- client/src/ui/Menu.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'client/src/ui/Menu.js') 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 ( -- cgit v1.2.3