#26 完了
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 = () => {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 }
|
||||
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user