This commit is contained in:
2025-07-17 04:51:57 +09:00
parent 88bf6c8446
commit 315d511f41
11 changed files with 136 additions and 55 deletions
+8 -2
View File
@@ -8,15 +8,21 @@ import { useLocation, useNavigate } from 'react-router-dom'
import MainArea from '@/components/layout/MainArea'
import { toast } from '@/components/ui/use-toast'
import { API_BASE_URL, SITE_TITLE } from '@/config'
import Forbidden from '@/pages/Forbidden'
import 'react-markdown-editor-lite/lib/index.css'
import type { WikiPage } from '@/types'
import type { User, WikiPage } from '@/types'
const mdParser = new MarkdownIt
type Props = { user: User | null }
export default ({ user }: Props) => {
if (!(['admin', 'member'].some (r => user?.role === r)))
return <Forbidden />
export default () => {
const location = useLocation ()
const navigate = useNavigate ()