|
|
|
@@ -12,6 +12,8 @@ import Forbidden from '@/pages/Forbidden' |
|
|
|
|
|
|
|
import 'react-markdown-editor-lite/lib/index.css' |
|
|
|
|
|
|
|
import type { FC } from 'react' |
|
|
|
|
|
|
|
import type { User, WikiPage } from '@/types' |
|
|
|
|
|
|
|
const mdParser = new MarkdownIt |
|
|
|
@@ -19,7 +21,7 @@ const mdParser = new MarkdownIt |
|
|
|
type Props = { user: User | null } |
|
|
|
|
|
|
|
|
|
|
|
export default ({ user }: Props) => { |
|
|
|
export default (({ user }: Props) => { |
|
|
|
if (!(['admin', 'member'].some (r => user?.role === r))) |
|
|
|
return <Forbidden/> |
|
|
|
|
|
|
|
@@ -93,9 +95,9 @@ export default ({ user }: Props) => { |
|
|
|
{/* 送信 */} |
|
|
|
<button onClick={handleSubmit} |
|
|
|
className="px-4 py-2 bg-blue-600 text-white rounded disabled:bg-gray-400"> |
|
|
|
追加 |
|
|
|
編輯 |
|
|
|
</button> |
|
|
|
</>)} |
|
|
|
</div> |
|
|
|
</MainArea>) |
|
|
|
} |
|
|
|
}) satisfies FC<Props> |