@@ -41,6 +41,10 @@ const NewQuestion = () => {
41
41
const [ uploadedImagesUrl , setUploadedImagesUrl ] = useState < string [ ] > ( [ ] ) ;
42
42
const [ isPreviewQuestion , setIsPreviewQuestion ] = useState < boolean > ( false ) ;
43
43
44
+ const [ pythonTemplate , setPythonTemplate ] = useState < string > ( "" ) ;
45
+ const [ javaTemplate , setJavaTemplate ] = useState < string > ( "" ) ;
46
+ const [ cTemplate , setCTemplate ] = useState < string > ( "" ) ;
47
+
44
48
const handleBack = ( ) => {
45
49
if (
46
50
title ||
@@ -72,6 +76,9 @@ const NewQuestion = () => {
72
76
description : markdownText ,
73
77
complexity : selectedComplexity ,
74
78
categories : selectedCategories ,
79
+ pythonTemplate,
80
+ javaTemplate,
81
+ cTemplate,
75
82
} ,
76
83
dispatch
77
84
) ;
@@ -134,6 +141,23 @@ const NewQuestion = () => {
134
141
markdownText = { markdownText }
135
142
setMarkdownText = { setMarkdownText }
136
143
/>
144
+
145
+ { /* for the FE ppl to redesign... */ }
146
+ < input
147
+ placeholder = "Python Template"
148
+ value = { pythonTemplate }
149
+ onChange = { ( e ) => setPythonTemplate ( e . target . value ) }
150
+ />
151
+ < input
152
+ placeholder = "Java Template"
153
+ value = { javaTemplate }
154
+ onChange = { ( e ) => setJavaTemplate ( e . target . value ) }
155
+ />
156
+ < input
157
+ placeholder = "C Template"
158
+ value = { cTemplate }
159
+ onChange = { ( e ) => setCTemplate ( e . target . value ) }
160
+ />
137
161
</ >
138
162
) }
139
163
0 commit comments