-
{
+ {
e.preventDefault ()
- setFramed (confirm ('未確認の外部ページを表示します。\n'
- + '悪意のあるスクリプトが実行される可能性があります。\n'
- + '表示しますか?'))
- return
+
+ setFramed (await dialogue.confirm ({
+ title: '未確認の外部ページを表示します。',
+ description: (
+
+
悪意のあるスクリプトが実行される可能性があります。
+
表示しますか?
+
),
+ confirmText: '表示' }))
}}>
外部ページを表示
diff --git a/frontend/src/components/PostFormTagsArea.tsx b/frontend/src/components/PostFormTagsArea.tsx
index 92450c1..7588202 100644
--- a/frontend/src/components/PostFormTagsArea.tsx
+++ b/frontend/src/components/PostFormTagsArea.tsx
@@ -7,7 +7,7 @@ import Label from '@/components/common/Label'
import TextArea from '@/components/common/TextArea'
import { apiGet } from '@/lib/api'
-import type { FC, SyntheticEvent } from 'react'
+import type { ComponentPropsWithoutRef, FC, SyntheticEvent } from 'react'
import type { Tag } from '@/types'
@@ -31,12 +31,12 @@ const replaceToken = (value: string, start: number, end: number, text: string) =
`${ value.slice (0, start) }${ text }${ value.slice (end) }`
-type Props = {
+type Props = Omit
, 'value' | 'onChange' | 'onBlur'> & {
tags: string
setTags: (tags: string) => void }
-export default (({ tags, setTags }: Props) => {
+export default (({ tags, setTags, ...rest }: Props) => {
const ref = useRef (null)
const [bounds, setBounds] = useState<{ start: number; end: number }> ({ start: 0, end: 0 })
@@ -76,6 +76,7 @@ export default (({ tags, setTags }: Props) => {