@@ -13,13 +13,14 @@ import { useJobEditor } from "@/hooks/jobs/useJobEditor";
1313import { useTranslations } from "next-intl" ;
1414import { useLanguage } from "@/hooks/useLanguage" ;
1515import { khitHaungg } from "@/fonts/fonts" ;
16+ import JobTypeSelect from "@/components/Ui/JobTypeSelect/JobTypeSelect" ;
1617
1718const INPUT_CLASS = cn (
1819 "w-full px-4 py-3 rounded-xl text-sm" ,
1920 "bg-white/[0.04] border border-white/[0.08]" ,
2021 "text-zinc-200 placeholder:text-zinc-600" ,
2122 "focus:outline-none focus:border-prism-cyan/40 focus:ring-1 focus:ring-prism-cyan/20" ,
22- "transition-all duration-200"
23+ "transition-all duration-200" ,
2324) ;
2425
2526function TagInput ( {
@@ -103,7 +104,7 @@ function JobWriteForm() {
103104 ( state : SerializedEditorState ) => {
104105 setDescription ( state ) ;
105106 } ,
106- [ setDescription ]
107+ [ setDescription ] ,
107108 ) ;
108109
109110 const handleSave = async ( ) => {
@@ -138,7 +139,12 @@ function JobWriteForm() {
138139 < div className = "w-9 h-9 rounded-lg flex items-center justify-center bg-gradient-to-br from-prism-cyan/20 to-prism-violet/20 border border-white/[0.08]" >
139140 < Briefcase className = "w-4.5 h-4.5 text-prism-cyan" />
140141 </ div >
141- < h1 className = { cn ( "text-xl font-semibold font-display text-white tracking-tight" , mmFont ) } >
142+ < h1
143+ className = { cn (
144+ "text-xl font-semibold font-display text-white tracking-tight" ,
145+ mmFont ,
146+ ) }
147+ >
142148 { t ( "postNewJob" ) }
143149 </ h1 >
144150 </ div >
@@ -153,7 +159,12 @@ function JobWriteForm() {
153159 >
154160 { /* Position */ }
155161 < div >
156- < label className = { cn ( "block text-xs font-mono text-zinc-500 uppercase tracking-wider mb-2" , mmFont ) } >
162+ < label
163+ className = { cn (
164+ "block text-xs font-mono text-zinc-500 uppercase tracking-wider mb-2" ,
165+ mmFont ,
166+ ) }
167+ >
157168 { t ( "formPosition" ) }
158169 </ label >
159170 < input
@@ -167,22 +178,26 @@ function JobWriteForm() {
167178
168179 { /* Tag (Job Type) */ }
169180 < div >
170- < label className = { cn ( "block text-xs font-mono text-zinc-500 uppercase tracking-wider mb-2" , mmFont ) } >
181+ < label
182+ className = { cn (
183+ "block text-xs font-mono text-zinc-500 uppercase tracking-wider mb-2" ,
184+ mmFont ,
185+ ) }
186+ >
171187 < Tag className = "w-3 h-3 inline mr-1" />
172188 { t ( "formTag" ) }
173189 </ label >
174- < input
175- type = "text"
176- value = { tag }
177- onChange = { ( e ) => setTag ( e . target . value ) }
178- placeholder = { t ( "formTagPlaceholder" ) }
179- className = { INPUT_CLASS }
180- />
190+ < JobTypeSelect value = { tag } onChange = { setTag } />
181191 </ div >
182192
183193 { /* Skills */ }
184194 < div >
185- < label className = { cn ( "block text-xs font-mono text-zinc-500 uppercase tracking-wider mb-2" , mmFont ) } >
195+ < label
196+ className = { cn (
197+ "block text-xs font-mono text-zinc-500 uppercase tracking-wider mb-2" ,
198+ mmFont ,
199+ ) }
200+ >
186201 { t ( "formSkills" ) }
187202 </ label >
188203 < TagInput
@@ -195,7 +210,12 @@ function JobWriteForm() {
195210
196211 { /* Office Email */ }
197212 < div >
198- < label className = { cn ( "block text-xs font-mono text-zinc-500 uppercase tracking-wider mb-2" , mmFont ) } >
213+ < label
214+ className = { cn (
215+ "block text-xs font-mono text-zinc-500 uppercase tracking-wider mb-2" ,
216+ mmFont ,
217+ ) }
218+ >
199219 < Mail className = "w-3 h-3 inline mr-1" />
200220 { t ( "formEmail" ) }
201221 </ label >
@@ -210,7 +230,12 @@ function JobWriteForm() {
210230
211231 { /* Expiration Date */ }
212232 < div >
213- < label className = { cn ( "block text-xs font-mono text-zinc-500 uppercase tracking-wider mb-2" , mmFont ) } >
233+ < label
234+ className = { cn (
235+ "block text-xs font-mono text-zinc-500 uppercase tracking-wider mb-2" ,
236+ mmFont ,
237+ ) }
238+ >
214239 < CalendarClock className = "w-3 h-3 inline mr-1" />
215240 { t ( "formExpiredAt" ) }
216241 </ label >
@@ -219,14 +244,24 @@ function JobWriteForm() {
219244 onChange = { setExpiredAt }
220245 placeholder = { t ( "formExpiredAtPlaceholder" ) }
221246 />
222- < p className = { cn ( "text-[11px] text-zinc-600 mt-1.5 font-mono" , mmFont ) } >
247+ < p
248+ className = { cn (
249+ "text-[11px] text-zinc-600 mt-1.5 font-mono" ,
250+ mmFont ,
251+ ) }
252+ >
223253 { t ( "formExpiredAtHint" ) }
224254 </ p >
225255 </ div >
226256
227257 { /* Description (Rich Text) */ }
228258 < div >
229- < label className = { cn ( "block text-xs font-mono text-zinc-500 uppercase tracking-wider mb-2" , mmFont ) } >
259+ < label
260+ className = { cn (
261+ "block text-xs font-mono text-zinc-500 uppercase tracking-wider mb-2" ,
262+ mmFont ,
263+ ) }
264+ >
230265 { t ( "formDescription" ) }
231266 </ label >
232267 < ContentEditor
@@ -237,9 +272,7 @@ function JobWriteForm() {
237272 </ div >
238273
239274 { /* Error */ }
240- { error && (
241- < p className = "text-sm text-prism-rose" > { error } </ p >
242- ) }
275+ { error && < p className = "text-sm text-prism-rose" > { error } </ p > }
243276
244277 { /* Actions */ }
245278 < div className = "flex items-center gap-3 pt-4" >
@@ -251,11 +284,13 @@ function JobWriteForm() {
251284 "flex items-center gap-2 px-6 py-3 rounded-xl text-sm font-medium" ,
252285 "bg-prism-cyan text-white" ,
253286 "hover:bg-prism-cyan/90 transition-colors duration-200" ,
254- "disabled:opacity-40 disabled:cursor-not-allowed"
287+ "disabled:opacity-40 disabled:cursor-not-allowed" ,
255288 ) }
256289 >
257290 < Save className = "w-4 h-4" />
258- < span className = { mmFont } > { saving ? t ( "saving" ) : t ( "saveDraft" ) } </ span >
291+ < span className = { mmFont } >
292+ { saving ? t ( "saving" ) : t ( "saveDraft" ) }
293+ </ span >
259294 </ button >
260295 </ div >
261296 </ motion . div >
0 commit comments