1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

migrate User Profile Page

This commit is contained in:
grafixeyehero 2022-06-29 04:16:20 +03:00
parent d2df5830b5
commit ab02f210ca
7 changed files with 41 additions and 31 deletions

View file

@ -4,17 +4,20 @@ import UserPasswordForm from '../components/dashboard/users/UserPasswordForm';
import { getParameterByName } from '../utils/url';
import SectionTitleContainer from '../components/dashboard/elements/SectionTitleContainer';
import Page from '../components/Page';
import loading from '../components/loading/loading';
const UserPasswordPage: FunctionComponent = () => {
const userId = getParameterByName('userId');
const [ userName, setUserName ] = useState('');
const loadUser = useCallback(() => {
loading.show();
window.ApiClient.getUser(userId).then(function (user) {
if (!user.Name) {
throw new Error('Unexpected null user.Name');
}
setUserName(user.Name);
loading.hide();
});
}, [userId]);
useEffect(() => {