mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-17 22:03:44 +02:00
ui(admin): implement user and node servers tab
This commit is contained in:
@@ -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;
|
||||
Reference in New Issue
Block a user