This commit is contained in:
2025-06-12 00:46:06 +09:00
parent 56f9ba699c
commit 3363fcd2ae
14 changed files with 32 additions and 171 deletions
+2 -10
View File
@@ -6,18 +6,10 @@ import { Input } from '@/components/ui/input'
import { toast } from '@/components/ui/use-toast'
import axios from 'axios'
import { Link, useNavigate, useLocation } from 'react-router-dom'
import { API_BASE_URL } from '../config'
import { API_BASE_URL } from '@/config'
import { camelizeKeys } from 'humps'
type Tag = { id: number
name: string
category: string
count?: number }
type User = { id: number
name: string | null
inheritanceCode: string
role: string }
import type { Tag, User } from '@/types'
type Props = { visible: boolean
onVisibleChange: (visible: boolean) => void
+2 -5
View File
@@ -1,13 +1,10 @@
import React, { useEffect, useState } from 'react'
import axios from 'axios'
import { Link, useNavigate, useLocation } from 'react-router-dom'
import { API_BASE_URL } from '../config'
import { API_BASE_URL } from '@/config'
import TagSearchBox from './TagSearchBox'
type Tag = { id: number
name: string
category: string
count?: number }
import type { Tag } from '@/types'
const TagSearch: React.FC = () => {
+1 -4
View File
@@ -3,10 +3,7 @@ import axios from 'axios'
import { Link, useNavigate, useLocation } from 'react-router-dom'
import { API_BASE_URL } from '../config'
type Tag = { id: number
name: string
category: string
count?: number }
import type { Tag } from '@/types'
type Props = { suggestions: Tag[]
activeIndex: number
+1 -13
View File
@@ -4,22 +4,10 @@ import { Link, useParams } from 'react-router-dom'
import { API_BASE_URL } from '../config'
import TagSearch from './TagSearch'
type Tag = { id: number
name: string
category: string }
import type { Post, Tag } from '@/types'
type TagByCategory = { [key: string]: Tag[] }
type OriginalTag = { id: number
name: string
category: string }
type Post = { id: number
url: string
title: string
thumbnail: string
tags: Tag[] }
type Props = { posts: Post[]
setPosts: (posts: Post[]) => void }
+1 -4
View File
@@ -4,10 +4,7 @@ import SettingsDialogue from './SettingsDialogue'
import { Button } from './ui/button'
import clsx from 'clsx'
type User = { id: number
name: string | null
inheritanceCode: string
role: string }
import type { User } from '@/types'
type Props = { user: User
setUser: (user: User) => void }
@@ -1,19 +0,0 @@
import MdEditor from 'react-markdown-editor-lite'
import 'react-markdown-editor-lite/lib/index.css'
import { marked } from 'marked'
type Props = { value: string
onChange: (text: string) => void
onSave: () => void }
const WikiEditor = ({ value, onChange, onSave }) => (
<div className="wiki-editor">
<MdEditor value={value}
style={{ height: '500px' }}
renderHTML={text => marked (text)} />
<button onClick={onSave}></button>
</div>)
export default WikiEditor