ui(admin): add user editing

This commit is contained in:
Matthew Penner 2021-09-12 17:00:22 -06:00
parent c716be263b
commit fc2f8744da
No known key found for this signature in database
GPG key ID: 030E4AB751DC756F
5 changed files with 71 additions and 122 deletions

View file

@ -1,3 +1,4 @@
import UserAboutContainer from '@/components/admin/users/UserAboutContainer';
import React, { useEffect, useState } from 'react';
import { useLocation } from 'react-router';
import tw from 'twin.macro';
@ -38,7 +39,7 @@ const UserRouter = () => {
useEffect(() => {
clearFlashes('user');
getUser(Number(match.params?.id), [ 'database_host', 'location' ])
getUser(Number(match.params?.id), [ 'role' ])
.then(user => setUser(user))
.catch(error => {
console.error(error);
@ -86,7 +87,7 @@ const UserRouter = () => {
<Switch location={location}>
<Route path={`${match.path}`} exact>
<p>About</p>
<UserAboutContainer/>
</Route>
<Route path={`${match.path}/servers`} exact>