Skip to content

Commit

Permalink
fix(doclinks): fix help link paths [EE-6861] (#11417)
Browse files Browse the repository at this point in the history
  • Loading branch information
hookenz committed Mar 18, 2024
1 parent 889c36f commit 6a3eda4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 5 additions & 3 deletions app/react/components/HelpLink/HelpLink.tsx
Original file line number Diff line number Diff line change
@@ -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({
Expand All @@ -14,7 +16,7 @@ export function HelpLink({
const docsUrl = useDocsUrl(docLink);

return (
<a href={docsUrl} target={target} rel="noreferrer">
<a href={docsUrl} target={target} rel="noopener noreferrer">
{children}
</a>
);
Expand Down
10 changes: 4 additions & 6 deletions app/react/docker/containers/CreateView/CreateView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -78,8 +78,6 @@ function CreateForm() {
isDockerhubRateLimited,
});

const createContDocUrl = useDocsUrl('/docker/containers/create');

if (!envQuery.data || !initialValuesQuery) {
return null;
}
Expand All @@ -103,10 +101,10 @@ function CreateForm() {
<TextTip>
The new container may fail to start if the image is changed, and
settings from the previous container aren&apos;t compatible. Common
causes include entrypoint, cmd or
<a href={createContDocUrl} target="_blank" rel="noreferrer">
causes include entrypoint, cmd or{' '}
<HelpLink docLink="/user/docker/containers/advanced">
other settings
</a>{' '}
</HelpLink>{' '}
set by an image.
</TextTip>
</InformationPanel>
Expand Down

0 comments on commit 6a3eda4

Please sign in to comment.