Skip to content

Commit

Permalink
Fix edit
Browse files Browse the repository at this point in the history
  • Loading branch information
noahtaylor205 committed Apr 16, 2024
1 parent 322d045 commit 0633d1f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/components/ec-helper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,23 @@ import { HeadingItem } from "./resume-items/heading-item";
import { ProjectItem } from "./resume-items/project-item";
import { SubheadingItem } from "./resume-items/subheading-item";
import { SkillItem } from "./resume-items/skill-item";
import { templates } from "@/api/models/templates";

const ECHelper: React.FC<{
object: BaseItem;
setDropdownIsOpen: Dispatch<SetStateAction<boolean>>;
itemId: string;
}> = ({ object, setDropdownIsOpen, itemId}) => {
templateId: templates | undefined;

}> = ({ object, setDropdownIsOpen, itemId, templateId}) => {
switch (object.type) {
case resumeItemTypes.EDUCATION:
return (
<EducationItem
setDropdownIsOpen={setDropdownIsOpen}
original={object as EducationType}
originalId={itemId}
templateId={templateId}
></EducationItem>
);

Expand All @@ -39,6 +43,7 @@ const ECHelper: React.FC<{
setDropdownIsOpen={setDropdownIsOpen}
original={object as ExperienceType}
originalId={itemId}
templateId={templateId}
></ExperienceItem>
);

Expand All @@ -48,6 +53,7 @@ const ECHelper: React.FC<{
setDropdownIsOpen={setDropdownIsOpen}
original={object as ActivitiesType}
originalId={itemId}
templateId={templateId}
></ExtracurricularItem>
);

Expand All @@ -57,6 +63,7 @@ const ECHelper: React.FC<{
setDropdownIsOpen={setDropdownIsOpen}
original={object as HeadingsType}
originalId={itemId}
templateId={templateId}
></HeadingItem>
);

Expand All @@ -66,6 +73,7 @@ const ECHelper: React.FC<{
setDropdownIsOpen={setDropdownIsOpen}
original={object as ProjectsType}
originalId={itemId}
templateId={templateId}
></ProjectItem>
);

Expand All @@ -75,6 +83,7 @@ const ECHelper: React.FC<{
setDropdownIsOpen={setDropdownIsOpen}
original={object as SectionHeadingsType}
originalId={itemId}
templateId={templateId}
></SubheadingItem>
);

Expand All @@ -84,6 +93,7 @@ const ECHelper: React.FC<{
setDropdownIsOpen={setDropdownIsOpen}
original={object as SkillsType}
originalId={itemId}
templateId={templateId}
></SkillItem>
);

Expand Down
1 change: 1 addition & 0 deletions src/pages/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,7 @@ const Editor: React.FC = () => {
}))
}
itemId={item.id}
templateId={resume?.templateId}
/>
<Button
className="text-red-500 font-bold"
Expand Down

0 comments on commit 0633d1f

Please sign in to comment.