From 6cf42e38c6ab889924b3eb883e5cba20236f41e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=BF=E3=81=A6=E3=82=8B=E3=81=9E?= Date: Thu, 1 Jan 2026 21:19:10 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AF=BE=E5=BF=9C=E5=A4=96=E3=81=AE?= =?UTF-8?q?=E6=8A=95=E7=A8=BF=E3=82=92=20iframe=20=E3=81=A7=E5=9F=8B?= =?UTF-8?q?=E8=BE=BC=E3=82=80=EF=BC=88#157=EF=BC=89=20(#199)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #157 #157 対応外の投稿を iframe で埋込む Co-authored-by: miteruzo Reviewed-on: https://git.miteruzo.com/miteruzo/btrc-hub/pulls/199 --- frontend/src/components/PostEmbed.tsx | 29 ++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/PostEmbed.tsx b/frontend/src/components/PostEmbed.tsx index abb0fbe..c375ca1 100644 --- a/frontend/src/components/PostEmbed.tsx +++ b/frontend/src/components/PostEmbed.tsx @@ -1,3 +1,4 @@ +import { useState } from 'react' import YoutubeEmbed from 'react-youtube' import NicoViewer from '@/components/NicoViewer' @@ -39,10 +40,28 @@ export default (({ post }: Props) => { } } + const [framed, setFramed] = useState (false) + return ( - - {post.url} - ) + <> + {framed + ? ( +