From dcac312d86d0d115326da015109d840d1728194e Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Sat, 19 Oct 2024 13:35:20 +0200 Subject: [PATCH] Use more flex utilities in ManageServers component --- src/common/NoMenuLayout.tsx | 9 +++++++-- src/servers/ManageServers.tsx | 24 +++++++++++------------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/src/common/NoMenuLayout.tsx b/src/common/NoMenuLayout.tsx index 868c1a1e..2a2e171d 100644 --- a/src/common/NoMenuLayout.tsx +++ b/src/common/NoMenuLayout.tsx @@ -1,6 +1,11 @@ +import { clsx } from 'clsx'; import type { FC, PropsWithChildren } from 'react'; import './NoMenuLayout.scss'; -export const NoMenuLayout: FC = ({ children }) => ( -
{children}
+export type NoMenuLayoutProps = PropsWithChildren & { + className?: string; +}; + +export const NoMenuLayout: FC = ({ children, className }) => ( +
{children}
); diff --git a/src/servers/ManageServers.tsx b/src/servers/ManageServers.tsx index 571f5c68..afef682d 100644 --- a/src/servers/ManageServers.tsx +++ b/src/servers/ManageServers.tsx @@ -5,7 +5,7 @@ import { Result, SearchField, SimpleCard } from '@shlinkio/shlink-frontend-kit'; import type { FC } from 'react'; import { useMemo, useState } from 'react'; import { Link } from 'react-router-dom'; -import { Button, Row } from 'reactstrap'; +import { Button } from 'reactstrap'; import { NoMenuLayout } from '../common/NoMenuLayout'; import type { FCWithDeps } from '../container/utils'; import { componentFactory, useDependencies } from '../container/utils'; @@ -44,24 +44,22 @@ const ManageServers: FCWithDeps = ({ serv const [errorImporting, setErrorImporting] = useTimeoutToggle(false, SHOW_IMPORT_MSG_TIME); return ( - - + + - -
+
+
Import servers {filteredServers.length > 0 && ( - )}
-
- -
- + +
@@ -83,7 +81,7 @@ const ManageServers: FCWithDeps = ({ serv {errorImporting && ( -
+
The servers could not be imported. Make sure the format is correct.
)}