diff --git a/frontend-client/components/EditorHeader.tsx b/frontend-client/components/EditorHeader.tsx index 16ac0fe93a..db0386c648 100644 --- a/frontend-client/components/EditorHeader.tsx +++ b/frontend-client/components/EditorHeader.tsx @@ -34,9 +34,10 @@ import { toast } from 'sonner' interface ProblemEditorProps { problem: ProblemDetail + contestId?: number } -export default function Editor({ problem }: ProblemEditorProps) { +export default function Editor({ problem, contestId }: ProblemEditorProps) { const { code, language, clearCode, setLanguage } = useEditorStore() const [loading, setLoading] = useState(false) const [submissionId, setSubmissionId] = useState(null) @@ -95,7 +96,8 @@ export default function Editor({ problem }: ProblemEditorProps) { ] }, searchParams: { - problemId: problem.id + problemId: problem.id, + ...(contestId && { contestId }) }, next: { revalidate: 0 diff --git a/frontend-client/components/EditorResizablePanel.tsx b/frontend-client/components/EditorResizablePanel.tsx index fe050d90db..90925f9d63 100644 --- a/frontend-client/components/EditorResizablePanel.tsx +++ b/frontend-client/components/EditorResizablePanel.tsx @@ -98,7 +98,7 @@ export default function EditorMainResizablePanel({
- +