From ad0c3063ba78c6eb66399d12d87de53c34ed01ba Mon Sep 17 00:00:00 2001
From: 安竹洋平 <61961825+yasutakeyohei@users.noreply.github.com>
Date: Thu, 23 May 2024 00:25:57 +0900
Subject: hrefがない場合はリンクしないよう修正
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/ExternalLink.js | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
(limited to 'src')
diff --git a/src/components/ExternalLink.js b/src/components/ExternalLink.js
index 82c87300..71e09dd9 100644
--- a/src/components/ExternalLink.js
+++ b/src/components/ExternalLink.js
@@ -3,9 +3,14 @@ import React from 'react';
import ExternalLinkIcon from '@theme/Icon/ExternalLink';
export default function ExternalLink({children, href}) {
+ if(href) {
+ return (
+
+ {children}
+
+ );
+ }
return (
-
- {children}
-
+ <>{children}>
);
}
\ No newline at end of file
--
cgit v1.2.3-54-g00ecf