From 44b7a5a59ab9616eeb89f26e4e0d6bfb453e8baf Mon Sep 17 00:00:00 2001 From: kidw0124 <38641848+kidw0124@users.noreply.github.com> Date: Tue, 6 Aug 2024 20:26:44 +0900 Subject: [PATCH] Fix errors --- .../[qid]/statements/EditStatement.tsx | 33 +++++++++++++++++-- .../[qid]/statements/StatementNavbar.tsx | 1 + src/app/problems/[qid]/statements/page.tsx | 7 +++- 3 files changed, 38 insertions(+), 3 deletions(-) diff --git a/src/app/problems/[qid]/statements/EditStatement.tsx b/src/app/problems/[qid]/statements/EditStatement.tsx index ec4efc3..90a6fe7 100644 --- a/src/app/problems/[qid]/statements/EditStatement.tsx +++ b/src/app/problems/[qid]/statements/EditStatement.tsx @@ -1,13 +1,42 @@ -import { Button, Paper, Stack, TextField } from '@mui/material'; +import { + Button, + Paper, + Stack, + TextField, + Typography, + ButtonGroup, +} from '@mui/material'; // As same as Polygon, the page link is same for creating new language and editing existed language // It can be divided into two pages if needed -export default function EditStatement({ language }: { language: string }) { +export default function EditStatement({ + language, + languageName, +}: { + language: string; + languageName: string; +}) { // have to fetch the statement and tutorial from the server by the language return ( + + + + Edit {languageName}({language}) Statement + + + + + + + + + It is recommended to use simple TeX, "Preview in HTML" feature supports only + subset of TeX markup + + ))} diff --git a/src/app/problems/[qid]/statements/page.tsx b/src/app/problems/[qid]/statements/page.tsx index 8f5d02f..50af18c 100644 --- a/src/app/problems/[qid]/statements/page.tsx +++ b/src/app/problems/[qid]/statements/page.tsx @@ -41,7 +41,12 @@ export default function Problem() { /> )} {existedLanguageList.find((lang) => lang.value === language) && ( - + lang.value === language)?.label || '' + } + /> )} );