From 030bc2d8efb511a17a2703eaefa898c71222ac96 Mon Sep 17 00:00:00 2001 From: Matthew Penner Date: Mon, 2 Aug 2021 10:01:55 -0600 Subject: [PATCH] ui(admin): fix server table links --- .../components/admin/servers/ServersTable.tsx | 10 ++++------ .../components/admin/users/UsersContainer.tsx | 4 ++-- resources/scripts/routers/AdminRouter.tsx | 12 +++--------- 3 files changed, 9 insertions(+), 17 deletions(-) diff --git a/resources/scripts/components/admin/servers/ServersTable.tsx b/resources/scripts/components/admin/servers/ServersTable.tsx index da395c224..fe9c33a1f 100644 --- a/resources/scripts/components/admin/servers/ServersTable.tsx +++ b/resources/scripts/components/admin/servers/ServersTable.tsx @@ -1,5 +1,5 @@ import React, { useContext, useEffect } from 'react'; -import { NavLink, useRouteMatch } from 'react-router-dom'; +import { NavLink } from 'react-router-dom'; import tw from 'twin.macro'; import getServers, { Context as ServersContext, Filters } from '@/api/admin/servers/getServers'; import AdminCheckbox from '@/components/admin/AdminCheckbox'; @@ -33,8 +33,6 @@ interface Props { } function ServersTable ({ filters }: Props) { - const match = useRouteMatch(); - const { clearFlashes, clearAndAddHttpError } = useFlash(); const { page, setPage, setFilters, sort, setSort, sortDirection } = useContext(ServersContext); @@ -106,7 +104,7 @@ function ServersTable ({ filters }: Props) { - + {server.name} @@ -115,11 +113,11 @@ function ServersTable ({ filters }: Props) {
- Silly User + {server.relations.user?.email}
- {server.relations.user?.email} + {server.relations.user?.uuid.split('-')[0]}
diff --git a/resources/scripts/components/admin/users/UsersContainer.tsx b/resources/scripts/components/admin/users/UsersContainer.tsx index a77a58233..533219bb7 100644 --- a/resources/scripts/components/admin/users/UsersContainer.tsx +++ b/resources/scripts/components/admin/users/UsersContainer.tsx @@ -130,11 +130,11 @@ const UsersContainer = () => {
- Silly User + {user.email}
- {user.email} + {user.uuid.split('-')[0]}
diff --git a/resources/scripts/routers/AdminRouter.tsx b/resources/scripts/routers/AdminRouter.tsx index 0f964290a..637296004 100644 --- a/resources/scripts/routers/AdminRouter.tsx +++ b/resources/scripts/routers/AdminRouter.tsx @@ -78,7 +78,7 @@ const Sidebar = styled.div<{ collapsed?: boolean }>` } & > div.user { - ${tw`h-16 w-full flex items-center justify-center bg-neutral-700`}; + ${tw`h-16 w-full flex items-center bg-neutral-700`}; ${props => !props.collapsed && tw`mt-auto px-5`}; & > div, a { @@ -172,16 +172,10 @@ const AdminRouter = ({ location, match }: RouteComponentProps) => {
Profile Picture -
- Silly User +
+ {user?.email} {user?.roleName}
- - - - - -