Skip to content

A one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!

Dialogs that accept keywords, track pending inputs

CorreyL390f274d0680
diff --git a/apps/client/src/pages/builder/sidebars/left/dialogs/custom-section.tsx b/apps/client/src/pages/builder/sidebars/left/dialogs/custom-section.tsx
index 26c740165..c683c2ea6 100644
--- a/apps/client/src/pages/builder/sidebars/left/dialogs/custom-section.tsx
+++ b/apps/client/src/pages/builder/sidebars/left/dialogs/custom-section.tsx
@@ -15,6 +15,7 @@ import {
RichInput,
} from "@reactive-resume/ui";
import { AnimatePresence, motion } from "framer-motion";
+import { useState } from "react";
import { useForm } from "react-hook-form";
import { z } from "zod";
@@ -36,6 +37,8 @@ export const CustomSectionDialog = () => {
resolver: zodResolver(formSchema),
});
+ const [pendingKeyword, setPendingKeyword] = useState("");
+
if (!payload) return null;
return (
@@ -43,6 +46,7 @@ export const CustomSectionDialog = () => {
form={form}
id={payload.id as DialogName}
defaultValues={defaultCustomSection}
+ pendingKeyword={pendingKeyword}
>
<div className="grid grid-cols-1 gap-4 sm:grid-cols-2">
<FormField
@@ -144,7 +148,7 @@ export const CustomSectionDialog = () => {
<FormItem>
<FormLabel>{t`Keywords`}</FormLabel>
<FormControl>
- <BadgeInput {...field} />
+ <BadgeInput {...field} setPendingKeyword={setPendingKeyword} />
</FormControl>
<FormDescription>
{t`You can add multiple keywords by separating them with a comma or pressing enter.`}
diff --git a/apps/client/src/pages/builder/sidebars/left/dialogs/interests.tsx b/apps/client/src/pages/builder/sidebars/left/dialogs/interests.tsx
index 1486f259f..d2bd09c74 100644
--- a/apps/client/src/pages/builder/sidebars/left/dialogs/interests.tsx
+++ b/apps/client/src/pages/builder/sidebars/left/dialogs/interests.tsx
@@ -14,6 +14,7 @@ import {
Input,
} from "@reactive-resume/ui";
import { AnimatePresence, motion } from "framer-motion";
+import { useState } from "react";
import { useForm } from "react-hook-form";
import { z } from "zod";
@@ -29,8 +30,15 @@ export const InterestsDialog = () => {
resolver: zodResolver(formSchema),
});
+ const [pendingKeyword, setPendingKeyword] = useState("");
+
return (
- <SectionDialog<FormValues> id="interests" form={form} defaultValues={defaultInterest}>
+ <SectionDialog<FormValues>
+ id="interests"
+ form={form}
+ defaultValues={defaultInterest}
+ pendingKeyword={pendingKeyword}
+ >
<div className="grid grid-cols-1 gap-4 sm:grid-cols-2">
<FormField
name="name"
@@ -54,7 +62,7 @@ export const InterestsDialog = () => {
<FormItem>
<FormLabel>{t`Keywords`}</FormLabel>
<FormControl>
- <BadgeInput {...field} />
+ <BadgeInput {...field} setPendingKeyword={setPendingKeyword} />
</FormControl>
<FormDescription>
{t`You can add multiple keywords by separating them with a comma or pressing enter.`}
diff --git a/apps/client/src/pages/builder/sidebars/left/dialogs/projects.tsx b/apps/client/src/pages/builder/sidebars/left/dialogs/projects.tsx
index 706ba7f0c..083494928 100644
--- a/apps/client/src/pages/builder/sidebars/left/dialogs/projects.tsx
+++ b/apps/client/src/pages/builder/sidebars/left/dialogs/projects.tsx
@@ -15,6 +15,7 @@ import {
RichInput,
} from "@reactive-resume/ui";
import { AnimatePresence, motion } from "framer-motion";
+import { useState } from "react";
import { useForm } from "react-hook-form";
import { z } from "zod";
@@ -33,8 +34,15 @@ export const ProjectsDialog = () => {
resolver: zodResolver(formSchema),
});
+ const [pendingKeyword, setPendingKeyword] = useState("");
+
return (
- <SectionDialog<FormValues> id="projects" form={form} defaultValues={defaultProject}>
+ <SectionDialog<FormValues>
+ id="projects"
+ form={form}
+ defaultValues={defaultProject}
+ pendingKeyword={pendingKeyword}
+ >
<div className="grid grid-cols-1 gap-4 sm:grid-cols-2">
<FormField
name="name"
@@ -121,7 +129,7 @@ export const ProjectsDialog = () => {
<FormItem>
<FormLabel>{t`Keywords`}</FormLabel>
<FormControl>
- <BadgeInput {...field} />
+ <BadgeInput {...field} setPendingKeyword={setPendingKeyword} />
</FormControl>
<FormDescription>
{t`You can add multiple keywords by separating them with a comma or pressing enter.`}
diff --git a/apps/client/src/pages/builder/sidebars/left/dialogs/skills.tsx b/apps/client/src/pages/builder/sidebars/left/dialogs/skills.tsx
index 439a5dc9b..70405b3e8 100644
--- a/apps/client/src/pages/builder/sidebars/left/dialogs/skills.tsx
+++ b/apps/client/src/pages/builder/sidebars/left/dialogs/skills.tsx
@@ -15,6 +15,7 @@ import {
Slider,
} from "@reactive-resume/ui";
import { AnimatePresence, motion } from "framer-motion";
+import { useState } from "react";
import { useForm } from "react-hook-form";
import { z } from "zod";
@@ -30,8 +31,15 @@ export const SkillsDialog = () => {
resolver: zodResolver(formSchema),
});
+ const [pendingKeyword, setPendingKeyword] = useState("");
+
return (
- <SectionDialog<FormValues> id="skills" form={form} defaultValues={defaultSkill}>
+ <SectionDialog<FormValues>
+ id="skills"
+ form={form}
+ defaultValues={defaultSkill}
+ pendingKeyword={pendingKeyword}
+ >
<div className="grid grid-cols-1 gap-4 sm:grid-cols-2">
<FormField
name="name"
@@ -98,7 +106,7 @@ export const SkillsDialog = () => {
<FormItem>
<FormLabel>{t`Keywords`}</FormLabel>
<FormControl>
- <BadgeInput {...field} />
+ <BadgeInput {...field} setPendingKeyword={setPendingKeyword} />
</FormControl>
<FormDescription>
{t`You can add multiple keywords by separating them with a comma or pressing enter.`}