Skip to content

Commit 3d5c72b

Browse files
chore: remove some unused components (#4040)
1 parent a227eb6 commit 3d5c72b

101 files changed

Lines changed: 712 additions & 1829 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

client/src/components/LegacyExternalLinks.tsx

Lines changed: 0 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@
1717
*/
1818

1919
import cx from "classnames";
20-
import { useRef } from "react";
2120
import { BoxArrowUpRight } from "react-bootstrap-icons";
22-
import { UncontrolledTooltip } from "reactstrap";
2321

2422
type ExternalLinkButtonProps = Pick<
2523
ExternalLinkProps,
@@ -155,63 +153,3 @@ export function ExternalLink({
155153
return <ExternalLinkText {...myProps} />;
156154
return <ExternalLinkButton {...myProps} />;
157155
}
158-
159-
interface ExternalDocsLinkProps {
160-
children?: React.ReactNode | null;
161-
/** [Optional] Any classes to add, e.g., 'nav-link' or 'dropdown-item' */
162-
className?: string;
163-
/** Show the icon to indicate an external link if true (default false) */
164-
showLinkIcon?: boolean;
165-
/** The text to show for the link */
166-
title: string;
167-
/** The URL to link to */
168-
url: string;
169-
}
170-
/**
171-
* Link to external URL, with the role as text.
172-
*/
173-
export function ExternalDocsLink(props: ExternalDocsLinkProps) {
174-
const role = "link";
175-
return <ExternalLink role={role} {...props} />;
176-
}
177-
178-
interface ExternalIconLinkProps {
179-
/** [Optional] Any classes to add, e.g., 'nav-link' or 'dropdown-item' */
180-
className?: string;
181-
/** An icon to display */
182-
icon: React.ReactNode;
183-
/** The text to show for the link */
184-
text: React.ReactNode;
185-
/** The text of the tooltip */
186-
tooltip?: React.ReactNode;
187-
/** The URL to link to */
188-
url: string;
189-
}
190-
export function ExternalIconLink({
191-
className,
192-
icon,
193-
text,
194-
tooltip,
195-
url,
196-
}: ExternalIconLinkProps) {
197-
const ref = useRef<HTMLAnchorElement>(null);
198-
199-
return (
200-
<>
201-
<a
202-
href={url}
203-
role="button"
204-
className={cx("btn-icon-text", tooltip && "icon-link", className)}
205-
ref={ref}
206-
target="_blank"
207-
rel="noreferrer noopener"
208-
>
209-
{icon}
210-
{text}
211-
</a>
212-
{tooltip && (
213-
<UncontrolledTooltip target={ref}>{tooltip}</UncontrolledTooltip>
214-
)}
215-
</>
216-
);
217-
}

0 commit comments

Comments
 (0)