From 2df0ae8b4e4497d1bbc06b59ae799b6ae6464da0 Mon Sep 17 00:00:00 2001 From: Sampo Silvennoinen Date: Sat, 24 Feb 2024 18:11:55 +0200 Subject: [PATCH] External link: rewrite in TS --- ...xternalLink.test.js => ExternalLink.test.tsx} | 0 ...k.test.js.snap => ExternalLink.test.tsx.snap} | 0 src/components/ExternalLink/index.js | 11 ----------- src/components/ExternalLink/index.tsx | 16 ++++++++++++++++ 4 files changed, 16 insertions(+), 11 deletions(-) rename src/components/ExternalLink/{ExternalLink.test.js => ExternalLink.test.tsx} (100%) rename src/components/ExternalLink/__snapshots__/{ExternalLink.test.js.snap => ExternalLink.test.tsx.snap} (100%) delete mode 100644 src/components/ExternalLink/index.js create mode 100644 src/components/ExternalLink/index.tsx diff --git a/src/components/ExternalLink/ExternalLink.test.js b/src/components/ExternalLink/ExternalLink.test.tsx similarity index 100% rename from src/components/ExternalLink/ExternalLink.test.js rename to src/components/ExternalLink/ExternalLink.test.tsx diff --git a/src/components/ExternalLink/__snapshots__/ExternalLink.test.js.snap b/src/components/ExternalLink/__snapshots__/ExternalLink.test.tsx.snap similarity index 100% rename from src/components/ExternalLink/__snapshots__/ExternalLink.test.js.snap rename to src/components/ExternalLink/__snapshots__/ExternalLink.test.tsx.snap diff --git a/src/components/ExternalLink/index.js b/src/components/ExternalLink/index.js deleted file mode 100644 index ff2672a..0000000 --- a/src/components/ExternalLink/index.js +++ /dev/null @@ -1,11 +0,0 @@ -export default function ExternalLink({ href, title }) { - return ( - - {title} - - ) -} diff --git a/src/components/ExternalLink/index.tsx b/src/components/ExternalLink/index.tsx new file mode 100644 index 0000000..60e6852 --- /dev/null +++ b/src/components/ExternalLink/index.tsx @@ -0,0 +1,16 @@ +interface ExternalLinkProps{ + href: string, + title: string, +} + +export default function ExternalLink({ href, title }: ExternalLinkProps) { + return ( + + {title} + + ) +}