ui(admin): implement user and node servers tab
This commit is contained in:
parent
bf9dfa87da
commit
11fc88c849
9 changed files with 234 additions and 186 deletions
|
@ -10,6 +10,7 @@ import Spinner from '@/components/elements/Spinner';
|
|||
import FlashMessageRender from '@/components/FlashMessageRender';
|
||||
import { ApplicationStore } from '@/state';
|
||||
import { SubNavigation, SubNavigationLink } from '@/components/admin/SubNavigation';
|
||||
import UserServers from '@/components/admin/users/UserServers';
|
||||
|
||||
interface ctx {
|
||||
user: User | undefined;
|
||||
|
@ -89,7 +90,7 @@ const UserRouter = () => {
|
|||
</Route>
|
||||
|
||||
<Route path={`${match.path}/servers`} exact>
|
||||
<p>Servers</p>
|
||||
<UserServers/>
|
||||
</Route>
|
||||
</Switch>
|
||||
</AdminContentBlock>
|
||||
|
|
13
resources/scripts/components/admin/users/UserServers.tsx
Normal file
13
resources/scripts/components/admin/users/UserServers.tsx
Normal file
|
@ -0,0 +1,13 @@
|
|||
import React from 'react';
|
||||
import ServersTable from '@/components/admin/servers/ServersTable';
|
||||
import { Context } from '@/components/admin/users/UserRouter';
|
||||
|
||||
function UserServers () {
|
||||
const user = Context.useStoreState(state => state.user);
|
||||
|
||||
return (
|
||||
<ServersTable filters={{ owner_id: user?.id?.toString() }}/>
|
||||
);
|
||||
}
|
||||
|
||||
export default UserServers;
|
Loading…
Add table
Add a link
Reference in a new issue