mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-13 16:22:59 +10:00
- implement awards section
This commit is contained in:
@ -1,10 +1,10 @@
|
||||
import { Field, FieldArray, Formik } from "formik";
|
||||
import { get } from "lodash";
|
||||
import React, { useContext } from "react";
|
||||
import React from "react";
|
||||
import { MdAdd } from "react-icons/md";
|
||||
import * as Yup from "yup";
|
||||
import Input from "../../components/shared/Input";
|
||||
import ModalContext from "../../contexts/ModalContext";
|
||||
import ModalEvents from "../../constants/ModalEvents";
|
||||
import { handleKeyDown } from "../../utils";
|
||||
import DataModal from "../DataModal";
|
||||
|
||||
@ -38,11 +38,10 @@ const validationSchema = Yup.object().shape({
|
||||
});
|
||||
|
||||
const WorkModal = () => {
|
||||
const { events } = useContext(ModalContext);
|
||||
|
||||
const getFieldProps = (formik, name) => ({
|
||||
touched: get(formik, `touched.${name}`, false),
|
||||
error: get(formik, `errors.${name}`, ""),
|
||||
isRequired: get(validationSchema, `fields.${name}._exclusive.required`),
|
||||
...formik.getFieldProps(name),
|
||||
});
|
||||
|
||||
@ -56,7 +55,7 @@ const WorkModal = () => {
|
||||
<DataModal
|
||||
path="work.items"
|
||||
name="Work Experience"
|
||||
event={events.WORK_MODAL}
|
||||
event={ModalEvents.WORK_MODAL}
|
||||
>
|
||||
<div className="grid grid-cols-2 gap-8">
|
||||
<Input
|
||||
|
||||
Reference in New Issue
Block a user