diff --git a/src/common/ShlinkVersions.tsx b/src/common/ShlinkVersions.tsx index 38a3a4aa..d19f9291 100644 --- a/src/common/ShlinkVersions.tsx +++ b/src/common/ShlinkVersions.tsx @@ -12,7 +12,7 @@ export interface ShlinkVersionsProps { } const VersionLink = ({ project, version }: { project: 'shlink' | 'shlink-web-client'; version: string }) => ( - + {version} ); @@ -21,7 +21,7 @@ export const ShlinkVersions = ({ selectedServer, clientVersion = SHLINK_WEB_CLIE const normalizedClientVersion = normalizeVersion(clientVersion); return ( - + {isReachableServer(selectedServer) && ( <>Server: - )} diff --git a/src/common/ShlinkVersionsContainer.tsx b/src/common/ShlinkVersionsContainer.tsx index 18e1a680..03f60878 100644 --- a/src/common/ShlinkVersionsContainer.tsx +++ b/src/common/ShlinkVersionsContainer.tsx @@ -9,7 +9,7 @@ export type ShlinkVersionsContainerProps = { export const ShlinkVersionsContainer = ({ selectedServer }: ShlinkVersionsContainerProps) => (
diff --git a/src/servers/DeleteServerButton.tsx b/src/servers/DeleteServerButton.tsx index 78cb7004..e362d6fb 100644 --- a/src/servers/DeleteServerButton.tsx +++ b/src/servers/DeleteServerButton.tsx @@ -1,7 +1,4 @@ -import { faMinusCircle as deleteIcon } from '@fortawesome/free-solid-svg-icons'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { useToggle } from '@shlinkio/shlink-frontend-kit'; -import { clsx } from 'clsx'; import type { FC, PropsWithChildren } from 'react'; import { useCallback } from 'react'; import { useNavigate } from 'react-router'; @@ -12,17 +9,13 @@ import type { DeleteServerModalProps } from './DeleteServerModal'; export type DeleteServerButtonProps = PropsWithChildren<{ server: ServerWithId; - className?: string; - textClassName?: string; }>; type DeleteServerButtonDeps = { DeleteServerModal: FC; }; -const DeleteServerButton: FCWithDeps = ( - { server, className, children, textClassName }, -) => { +const DeleteServerButton: FCWithDeps = ({ server, children }) => { const { DeleteServerModal } = useDependencies(DeleteServerButton); const [isModalOpen, , showModal, hideModal] = useToggle(); const navigate = useNavigate(); @@ -35,11 +28,9 @@ const DeleteServerButton: FCWithDeps - - ); diff --git a/src/servers/helpers/ServerError.tsx b/src/servers/helpers/ServerError.tsx index c95b39a3..a1bdd87b 100644 --- a/src/servers/helpers/ServerError.tsx +++ b/src/servers/helpers/ServerError.tsx @@ -45,7 +45,7 @@ const ServerError: FCWithDeps = ({ servers, s {isServerWithId(selectedServer) && (

Alternatively, if you think you may have misconfigured this server, you - can remove + can remove it or  edit it.

diff --git a/test/servers/DeleteServerButton.test.tsx b/test/servers/DeleteServerButton.test.tsx index 9c7eee7b..fce035cb 100644 --- a/test/servers/DeleteServerButton.test.tsx +++ b/test/servers/DeleteServerButton.test.tsx @@ -13,11 +13,11 @@ describe('', () => { const DeleteServerButton = DeleteServerButtonFactory(fromPartial({ DeleteServerModal: (props: DeleteServerModalProps) => , })); - const setUp = (children?: ReactNode) => { + const setUp = (children: ReactNode = 'Remove this server') => { const history = createMemoryHistory({ initialEntries: ['/foo'] }); const result = renderWithEvents( - {children} + {children} , ); @@ -30,7 +30,6 @@ describe('', () => { ['Foo bar'], ['baz'], ['something'], - [undefined], ])('renders expected content', (children) => { const { container } = setUp(children); expect(container.firstChild).toBeTruthy(); diff --git a/test/servers/__snapshots__/DeleteServerButton.test.tsx.snap b/test/servers/__snapshots__/DeleteServerButton.test.tsx.snap index 7d21e6cd..c012b222 100644 --- a/test/servers/__snapshots__/DeleteServerButton.test.tsx.snap +++ b/test/servers/__snapshots__/DeleteServerButton.test.tsx.snap @@ -2,67 +2,27 @@ exports[` > renders expected content 1`] = ` `; exports[` > renders expected content 2`] = ` `; exports[` > renders expected content 3`] = ` -`; - -exports[` > renders expected content 4`] = ` - `;