[resumes][refactor] Refactor comments form

pull/306/head
Terence Ho 3 years ago committed by Wu Peirong
parent 40a2f61ddb
commit 42825e7eb9

@ -57,18 +57,45 @@ export default function CommentsForm({
onSubmit={onFormSubmit}>
{/* TODO: Convert TextInput to TextArea */}
<div className="mt-4 space-y-4">
{COMMENTS_SECTIONS.map(({ label, value, placeholder }) => {
return (
<TextInput
key={value}
id={value}
label={label}
name={value}
placeholder={placeholder}
id="general"
label="General"
name="general"
placeholder="General comments about the resume"
type="text"
/>
<TextInput
id="education"
label="Education"
name="education"
placeholder="Comments about the Education section"
type="text"
/>
<TextInput
id="experience"
label="Experience"
name="experience"
placeholder="Comments about the Experience section"
type="text"
/>
<TextInput
id="projects"
label="Projects"
name="projects"
placeholder="Comments about the Projects section"
type="text"
/>
<TextInput
id="skills"
label="Skills"
name="skills"
placeholder="Comments about the Skills section"
type="text"
/>
);
})}
</div>
<div className="flex justify-end space-x-2 pt-4">

@ -2,27 +2,22 @@
export const COMMENTS_SECTIONS = [
{
label: 'General',
placeholder: 'General comments about the resume',
value: 'general',
},
{
label: 'Education',
placeholder: 'Comments about the Education section',
value: 'education',
},
{
label: 'Experience',
placeholder: 'Comments about the Experience section',
value: 'experience',
},
{
label: 'Projects',
placeholder: 'Comments about the Projects section',
value: 'projects',
},
{
label: 'Skills',
placeholder: 'Comments about the Skills section',
value: 'skills',
},
];

Loading…
Cancel
Save