From 98ed8e431b9a35aaa41ed607fd2805f09cb2dc9a Mon Sep 17 00:00:00 2001 From: Matthew Penner Date: Mon, 2 Aug 2021 11:32:09 -0600 Subject: [PATCH] ui(admin): cleanup --- .../admin/databases/DatabasesContainer.tsx | 12 ++++++------ resources/scripts/routers/AdminRouter.tsx | 9 ++++----- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/resources/scripts/components/admin/databases/DatabasesContainer.tsx b/resources/scripts/components/admin/databases/DatabasesContainer.tsx index 93ffc86b..9f3892db 100644 --- a/resources/scripts/components/admin/databases/DatabasesContainer.tsx +++ b/resources/scripts/components/admin/databases/DatabasesContainer.tsx @@ -1,12 +1,12 @@ import React, { useContext, useEffect } from 'react'; -import getDatabases, { Context as DatabasesContext, Filters } from '@/api/admin/databases/getDatabases'; -import FlashMessageRender from '@/components/FlashMessageRender'; -import useFlash from '@/plugins/useFlash'; -import { AdminContext } from '@/state/admin'; import { NavLink, useRouteMatch } from 'react-router-dom'; import tw from 'twin.macro'; -import AdminContentBlock from '@/components/admin/AdminContentBlock'; +import getDatabases, { Context as DatabasesContext, Filters } from '@/api/admin/databases/getDatabases'; +import useFlash from '@/plugins/useFlash'; +import { AdminContext } from '@/state/admin'; +import FlashMessageRender from '@/components/FlashMessageRender'; import AdminCheckbox from '@/components/admin/AdminCheckbox'; +import AdminContentBlock from '@/components/admin/AdminContentBlock'; import AdminTable, { TableBody, TableHead, TableHeader, TableRow, Pagination, Loading, NoItems, ContentWrapper, useTableHooks } from '@/components/admin/AdminTable'; import Button from '@/components/elements/Button'; import CopyOnClick from '@/components/elements/CopyOnClick'; @@ -103,7 +103,7 @@ const DatabasesContainer = () => { setSort('id')}/> setSort('name')}/> - setSort('username')}/> + diff --git a/resources/scripts/routers/AdminRouter.tsx b/resources/scripts/routers/AdminRouter.tsx index 9f3a1a38..e22d0a91 100644 --- a/resources/scripts/routers/AdminRouter.tsx +++ b/resources/scripts/routers/AdminRouter.tsx @@ -1,11 +1,10 @@ +import { State, useStoreState } from 'easy-peasy'; import React, { useState } from 'react'; import { NavLink, Route, RouteComponentProps, Switch } from 'react-router-dom'; -import { State, useStoreState } from 'easy-peasy'; import tw, { styled } from 'twin.macro'; -import { breakpoint } from '@/theme'; import { ApplicationStore } from '@/state'; import { AdminContext } from '@/state/admin'; -import { NotFound } from '@/components/elements/ScreenBlock'; +import { breakpoint } from '@/theme'; import OverviewContainer from '@/components/admin/overview/OverviewContainer'; import SettingsContainer from '@/components/admin/settings/SettingsContainer'; import DatabasesContainer from '@/components/admin/databases/DatabasesContainer'; @@ -29,6 +28,7 @@ import MountsContainer from '@/components/admin/mounts/MountsContainer'; import MountEditContainer from '@/components/admin/mounts/MountEditContainer'; import EggRouter from '@/components/admin/nests/eggs/EggRouter'; import ServerRouter from '@/components/admin/servers/ServerRouter'; +import { NotFound } from '@/components/elements/ScreenBlock'; const Sidebar = styled.div<{ collapsed?: boolean }>` ${tw`fixed h-screen hidden md:flex flex-col items-center flex-shrink-0 bg-neutral-900 overflow-x-hidden transition-all duration-250 ease-linear`}; @@ -79,8 +79,7 @@ const Sidebar = styled.div<{ collapsed?: boolean }>` & > div.user { ${tw`h-16 w-full flex items-center bg-neutral-700`}; - ${props => !props.collapsed && tw`mt-auto px-5`}; - ${props => props.collapsed && tw`justify-center`}; + ${props => props.collapsed ? tw`justify-center` : tw`mt-auto px-5`}; & > div, a { ${props => props.collapsed && tw`hidden`};