feat: user edit functionality (managing permissions)

This commit is contained in:
sct
2020-11-17 05:48:59 +00:00
parent ff8b9d8e7e
commit 185ac2648f
17 changed files with 415 additions and 120 deletions

View File

@@ -1,9 +0,0 @@
import React from 'react';
import { NextPage } from 'next';
import UserProfile from '../../components/UserProfile';
const UserProfilePage: NextPage = () => {
return <UserProfile />;
};
export default UserProfilePage;

View File

@@ -0,0 +1,12 @@
import React from 'react';
import { NextPage } from 'next';
import UserEdit from '../../../components/UserEdit';
import useRouteGuard from '../../../hooks/useRouteGuard';
import { Permission } from '../../../hooks/useUser';
const UserProfilePage: NextPage = () => {
useRouteGuard(Permission.MANAGE_USERS);
return <UserEdit />;
};
export default UserProfilePage;

View File

@@ -1,8 +1,11 @@
import React from 'react';
import type { NextPage } from 'next';
import UserList from '../../components/UserList';
import useRouteGuard from '../../hooks/useRouteGuard';
import { Permission } from '../../hooks/useUser';
const UsersPage: NextPage = () => {
useRouteGuard(Permission.MANAGE_USERS);
return <UserList />;
};