diff --git a/src/controllers/dashboard/users/usernew.html b/src/controllers/dashboard/users/usernew.html deleted file mode 100644 index c3f77c5e49..0000000000 --- a/src/controllers/dashboard/users/usernew.html +++ /dev/null @@ -1,3 +0,0 @@ -
- -
diff --git a/src/components/pages/NewUserPage.tsx b/src/routes/NewUserPage.tsx similarity index 92% rename from src/components/pages/NewUserPage.tsx rename to src/routes/NewUserPage.tsx index 6961917ccd..55e8ed3ece 100644 --- a/src/components/pages/NewUserPage.tsx +++ b/src/routes/NewUserPage.tsx @@ -1,14 +1,15 @@ import React, { FunctionComponent, useCallback, useEffect, useState, useRef } from 'react'; -import Dashboard from '../../utils/dashboard'; -import globalize from '../../scripts/globalize'; -import loading from '../loading/loading'; -import toast from '../toast/toast'; -import SectionTitleContainer from '../dashboard/elements/SectionTitleContainer'; -import InputElement from '../dashboard/elements/InputElement'; -import ButtonElement from '../dashboard/elements/ButtonElement'; -import AccessContainer from '../dashboard/users/AccessContainer'; -import CheckBoxElement from '../dashboard/elements/CheckBoxElement'; +import Dashboard from '../utils/dashboard'; +import globalize from '../scripts/globalize'; +import loading from '../components/loading/loading'; +import toast from '../components/toast/toast'; +import SectionTitleContainer from '../components/dashboard/elements/SectionTitleContainer'; +import InputElement from '../components/dashboard/elements/InputElement'; +import ButtonElement from '../components/dashboard/elements/ButtonElement'; +import AccessContainer from '../components/dashboard/users/AccessContainer'; +import CheckBoxElement from '../components/dashboard/elements/CheckBoxElement'; +import Page from '../components/Page'; type userInput = { Name?: string; @@ -175,8 +176,11 @@ const NewUserPage: FunctionComponent = () => { }, [loadUser]); return ( -
-
+ +
{
-
+ + ); }; diff --git a/src/routes/index.tsx b/src/routes/index.tsx index 3cc4896874..a1cbeadf57 100644 --- a/src/routes/index.tsx +++ b/src/routes/index.tsx @@ -2,6 +2,7 @@ import React from 'react'; import { Route, Routes } from 'react-router-dom'; import ConnectionRequired from '../components/ConnectionRequired'; +import NewUserPage from './NewUserPage'; import SearchPage from './search'; const AppRoutes = () => ( @@ -15,6 +16,14 @@ const AppRoutes = () => ( } /> + + + + } + /> {/* Suppress warnings for unhandled routes */} diff --git a/src/scripts/routes.js b/src/scripts/routes.js index e1f7cd8a3b..fc5cea83b3 100644 --- a/src/scripts/routes.js +++ b/src/scripts/routes.js @@ -445,14 +445,6 @@ import { appRouter } from '../components/appRouter'; pageComponent: 'UserLibraryAccessPage' }); - defineRoute({ - alias: '/usernew.html', - path: 'dashboard/users/usernew.html', - autoFocus: false, - roles: 'admin', - pageComponent: 'NewUserPage' - }); - defineRoute({ alias: '/userparentalcontrol.html', path: 'dashboard/users/userparentalcontrol.html',