diff --git a/apps/web/src/dialogs/resume/sections/experience.tsx b/apps/web/src/dialogs/resume/sections/experience.tsx
index cee35de1b..c9632c71a 100644
--- a/apps/web/src/dialogs/resume/sections/experience.tsx
+++ b/apps/web/src/dialogs/resume/sections/experience.tsx
@@ -158,103 +158,6 @@ const ExperienceForm = withForm({
form.setFieldValue("roles", newOrder);
};
- const RoleFields = ({ role, index, onRemove }: { role: RoleItem; index: number; onRemove: () => void }) => {
- const controls = useDragControls();
-
- return (
-
-
-
-
-
-
-
-
-
- {(field) => (
- 0}>
-
- Position
-
- field.handleChange(event.target.value)}
- />
- }
- />
-
-
- )}
-
-
-
- {(field) => (
- 0}>
-
- Period
-
- field.handleChange(event.target.value)}
- />
- }
- />
-
-
- )}
-
-
-
- {(field) => (
- 0}
- >
-
- Description
-
- field.handleChange(v)} />}
- />
-
-
- )}
-
-
-
- );
- };
-
return (
<>
{(field) => Company} />}
@@ -346,6 +249,7 @@ const ExperienceForm = withForm({
{rolesField.state.value.map((role: RoleItem, index: number) => (
{
@@ -380,3 +284,111 @@ const ExperienceForm = withForm({
);
},
});
+
+const RoleFields = withForm({
+ defaultValues,
+ props: {
+ role: {
+ id: "",
+ position: "",
+ period: "",
+ description: "",
+ } as RoleItem,
+ index: 0,
+ onRemove: () => undefined,
+ },
+ render: ({ form, role, index, onRemove }) => {
+ const controls = useDragControls();
+
+ return (
+
+
+
+
+
+
+
+
+
+ {(field) => (
+ 0}>
+
+ Position
+
+ field.handleChange(event.target.value)}
+ />
+ }
+ />
+
+
+ )}
+
+
+
+ {(field) => (
+ 0}>
+
+ Period
+
+ field.handleChange(event.target.value)}
+ />
+ }
+ />
+
+
+ )}
+
+
+
+ {(field) => (
+ 0}
+ >
+
+ Description
+
+ field.handleChange(v)} />} />
+
+
+ )}
+
+
+
+ );
+ },
+});