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

Remove duplicate appRouter.param function

This commit is contained in:
Bill Thornton 2022-04-11 11:20:53 -04:00
parent 1ad87beaf6
commit 812b8f1c74
5 changed files with 10 additions and 24 deletions

View file

@ -2,7 +2,6 @@ import { AccessSchedule, DynamicDayOfWeek, UserDto } from '@thornbill/jellyfin-s
import React, { FunctionComponent, useCallback, useEffect, useState, useRef } from 'react';
import globalize from '../../scripts/globalize';
import LibraryMenu from '../../scripts/libraryMenu';
import { appRouter } from '../appRouter';
import AccessScheduleList from '../dashboard/users/AccessScheduleList';
import BlockedTagList from '../dashboard/users/BlockedTagList';
import ButtonElement from '../dashboard/users/ButtonElement';
@ -13,6 +12,7 @@ import SelectMaxParentalRating from '../dashboard/users/SelectMaxParentalRating'
import SectionTabs from '../dashboard/users/SectionTabs';
import loading from '../loading/loading';
import toast from '../toast/toast';
import { getParameterByName } from '../../utils/url';
type RatingsArr = {
Name: string;
@ -194,7 +194,7 @@ const UserParentalControl: FunctionComponent = () => {
const loadData = useCallback(() => {
loading.show();
const userId = appRouter.param('userId');
const userId = getParameterByName('userId');
const promise1 = window.ApiClient.getUser(userId);
const promise2 = window.ApiClient.getParentalRatings();
Promise.all([promise1, promise2]).then(function (responses) {
@ -290,7 +290,7 @@ const UserParentalControl: FunctionComponent = () => {
const onSubmit = (e: Event) => {
loading.show();
const userId = appRouter.param('userId');
const userId = getParameterByName('userId');
window.ApiClient.getUser(userId).then(function (result) {
saveUser(result);
});