From 07de1b2c06b9232654ccf5cee7c5d2b30568bd03 Mon Sep 17 00:00:00 2001 From: Matt Hook Date: Tue, 19 Mar 2024 11:46:41 +1300 Subject: [PATCH] fix(doclinks): fix help link paths [EE-6861] (#11418) --- app/react/components/HelpLink/HelpLink.tsx | 8 +++++--- app/react/docker/containers/CreateView/CreateView.tsx | 10 ++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/react/components/HelpLink/HelpLink.tsx b/app/react/components/HelpLink/HelpLink.tsx index 5ced05c95..5f85b14ae 100644 --- a/app/react/components/HelpLink/HelpLink.tsx +++ b/app/react/components/HelpLink/HelpLink.tsx @@ -1,9 +1,11 @@ +import { ReactNode } from 'react'; + import { useDocsUrl } from '../PageHeader/ContextHelp/ContextHelp'; type HelpLinkProps = { - docLink?: string; + docLink: string; target?: string; - children?: React.ReactNode; + children?: ReactNode; }; export function HelpLink({ @@ -14,7 +16,7 @@ export function HelpLink({ const docsUrl = useDocsUrl(docLink); return ( - + {children} ); diff --git a/app/react/docker/containers/CreateView/CreateView.tsx b/app/react/docker/containers/CreateView/CreateView.tsx index 6ba44dc63..d264d4bc7 100644 --- a/app/react/docker/containers/CreateView/CreateView.tsx +++ b/app/react/docker/containers/CreateView/CreateView.tsx @@ -17,7 +17,7 @@ import { confirmDestructive } from '@@/modals/confirm'; import { buildConfirmButton } from '@@/modals/utils'; import { InformationPanel } from '@@/InformationPanel'; import { TextTip } from '@@/Tip/TextTip'; -import { useDocsUrl } from '@@/PageHeader/ContextHelp/ContextHelp'; +import { HelpLink } from '@@/HelpLink'; import { useContainers } from '../queries/containers'; import { useSystemLimits } from '../../proxy/queries/useInfo'; @@ -78,8 +78,6 @@ function CreateForm() { isDockerhubRateLimited, }); - const createContDocUrl = useDocsUrl('/docker/containers/create'); - if (!envQuery.data || !initialValuesQuery) { return null; } @@ -103,10 +101,10 @@ function CreateForm() { The new container may fail to start if the image is changed, and settings from the previous container aren't compatible. Common - causes include entrypoint, cmd or - + causes include entrypoint, cmd or{' '} + other settings - {' '} + {' '} set by an image.