|
|
@ -54,6 +54,11 @@ export const ProblemPage = ({ id }: RouteProps) => {
|
|
|
|
const [editing, setEditing] = useState<boolean>(false)
|
|
|
|
const [editing, setEditing] = useState<boolean>(false)
|
|
|
|
const [modifiedProblemSource, setModifiedProblemSource] = useState<string>('')
|
|
|
|
const [modifiedProblemSource, setModifiedProblemSource] = useState<string>('')
|
|
|
|
const [modifiedProblemTitle, setModifiedProblemTitle] = useState<string>(problem?.title ?? '')
|
|
|
|
const [modifiedProblemTitle, setModifiedProblemTitle] = useState<string>(problem?.title ?? '')
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
|
|
|
if (problem) {
|
|
|
|
|
|
|
|
setModifiedProblemTitle(problem.title)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}, [problem?.title])
|
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
useEffect(() => {
|
|
|
|
if (problem) {
|
|
|
|
if (problem) {
|
|
|
|