X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=resources%2Fjs%2Fapp%2FLanguageSwitcher.js;h=52efaf5fbaee87f1f76485a719111e2810c0f30b;hb=7fc357a5943bf280ce2fa9aa97ec516af61efd69;hp=f2b8f53f388e5ba5df9468c61e9845138af9d413;hpb=16662be0b3432d67307ae8c2bb798362d77bab99;p=alttp.git
diff --git a/resources/js/app/LanguageSwitcher.js b/resources/js/app/LanguageSwitcher.js
index f2b8f53..52efaf5 100644
--- a/resources/js/app/LanguageSwitcher.js
+++ b/resources/js/app/LanguageSwitcher.js
@@ -1,11 +1,10 @@
import axios from 'axios';
-import PropTypes from 'prop-types';
import React from 'react';
import { Button } from 'react-bootstrap';
import { withTranslation } from 'react-i18next';
import Icon from '../components/common/Icon';
-import { withUser } from '../helpers/UserContext';
+import { useUser } from '../hooks/user';
import i18n from '../i18n';
const setLanguage = (user, language) => {
@@ -15,22 +14,23 @@ const setLanguage = (user, language) => {
}
};
-const LanguageSwitcher = ({ user }) =>
-;
+const LanguageSwitcher = () => {
+ const { user } = useUser();
-LanguageSwitcher.propTypes = {
- user: PropTypes.shape({
- }),
+ return ;
};
-export default withTranslation()(withUser(LanguageSwitcher));
+export default withTranslation()(LanguageSwitcher);