このコミットが含まれているのは:
2026-05-11 03:32:47 +09:00
コミット add60cb413
72個のファイルの変更1659行の追加247行の削除
+6 -5
ファイルの表示
@@ -16,8 +16,9 @@ type Props = {
onMetadataChange?: (meta: NiconicoMetadata) => void }
export default (({ ref, post, onLoadComplete, onMetadataChange }: Props) => {
const PostEmbed: FC<Props> = ({ ref, post, onLoadComplete, onMetadataChange }) => {
const dialogue = useDialogue ()
const [framed, setFramed] = useState (false)
const url = new URL (post.url)
@@ -44,7 +45,7 @@ export default (({ ref, post, onLoadComplete, onMetadataChange }: Props) => {
case 'twitter.com':
case 'x.com':
{
const mUserId = url.pathname.match (/(?<=\/)[^\/]+?(?=\/|$|\?)/)
const mUserId = url.pathname.match (/(?<=\/)[^/]+?(?=\/|$|\?)/)
const mStatusId = url.pathname.match (/(?<=\/status\/)\d+?(?=\/|$|\?)/)
if (!(mUserId) || !(mStatusId))
break
@@ -72,8 +73,6 @@ export default (({ ref, post, onLoadComplete, onMetadataChange }: Props) => {
}
}
const [framed, setFramed] = useState (false)
return (
<>
{framed
@@ -101,4 +100,6 @@ export default (({ ref, post, onLoadComplete, onMetadataChange }: Props) => {
</a>
</div>)}
</>)
}) satisfies FC<Props>
}
export default PostEmbed