"use client"; import { useState } from "react"; import { Label } from "@/components/ui/label"; import { Input } from "@/components/ui/input"; import { Textarea } from "@/components/ui/textarea"; import { Button } from "@/components/ui/button"; import MdxPreview from "@/components/mdx-preview"; interface EditSolutionPanelProps { problemId: string; } export const EditSolutionPanel = ({ problemId, }: EditSolutionPanelProps) => { const [title, setTitle] = useState(`Solution for Problem ${problemId}`); const [content, setContent] = useState(`Solution content for Problem ${problemId}...`); const [viewMode, setViewMode] = useState<'edit' | 'preview' | 'compare'>('edit'); return (
setTitle(e.target.value)} placeholder="输入题解标题" />