X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=resources%2Fjs%2Fapp%2FUser.js;h=402178a6435dbae160ddc842f669a90cc1090125;hb=4c5a82cb876e96c72c50e8bc12bd8a43a9afe847;hp=4cfb57443485bcd674d0615a3f23d66dcdf1194d;hpb=1e725fef6dc440aaeea8c30e1e0598dc5d24ad86;p=alttp.git diff --git a/resources/js/app/User.js b/resources/js/app/User.js index 4cfb574..402178a 100644 --- a/resources/js/app/User.js +++ b/resources/js/app/User.js @@ -1,16 +1,15 @@ -import PropTypes from 'prop-types'; import React from 'react'; import { Button, Nav } from 'react-bootstrap'; import { LinkContainer } from 'react-router-bootstrap'; import { useTranslation } from 'react-i18next'; import Icon from '../components/common/Icon'; -import { useUser } from '../helpers/UserContext'; +import { useUser } from '../hooks/user'; import { getAvatarUrl } from '../helpers/User'; -const User = ({ doLogout }) => { +const User = () => { const { t } = useTranslation(); - const user = useUser(); + const { logout, user } = useUser(); return user ? <> @@ -27,7 +26,7 @@ const User = ({ doLogout }) => { ; }; -User.propTypes = { - doLogout: PropTypes.func, -}; - export default User;