From 2c67177d572ca329be2074adc06fbf915f4fa884 Mon Sep 17 00:00:00 2001 From: 安竹洋平 <61961825+yasutakeyohei@users.noreply.github.com> Date: Sat, 11 May 2024 00:16:48 +0900 Subject: hrefが空の場合はリンクしないように MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/BlockQuote.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/components/BlockQuote.js b/src/components/BlockQuote.js index 18eac100..605ae03d 100644 --- a/src/components/BlockQuote.js +++ b/src/components/BlockQuote.js @@ -4,9 +4,17 @@ import styles from './BlockQuote.module.css'; import { Icon } from '@iconify/react'; // Import the entire Iconify library. export default function BlockQuote({children, refs, href}) { + if (href) { + return ( +
++ ); + } return (+ {children} + {refs}
-); -- cgit v1.2.3-54-g00ecf+ {refs} {refs} {children}