{chips.length > 0 && (
-
- {chips.map((chip, idx) => (
-
- ))}
-
+
+
+
+ {chips.map((chip, idx) => (
+
+ ))}
+
+
+
)}
diff --git a/src/dialogs/resume/sections/custom.tsx b/src/dialogs/resume/sections/custom.tsx
index 56dc06f1f..feee96ec8 100644
--- a/src/dialogs/resume/sections/custom.tsx
+++ b/src/dialogs/resume/sections/custom.tsx
@@ -1,10 +1,14 @@
import { zodResolver } from "@hookform/resolvers/zod";
+import type { MessageDescriptor } from "@lingui/core";
+import { msg } from "@lingui/core/macro";
+import { useLingui } from "@lingui/react";
import { Trans } from "@lingui/react/macro";
import { PencilSimpleLineIcon, PlusIcon } from "@phosphor-icons/react";
import { useForm, useFormContext } from "react-hook-form";
import type z from "zod";
import { useResumeStore } from "@/components/resume/store/resume";
import { Button } from "@/components/ui/button";
+import { Combobox } from "@/components/ui/combobox";
import { DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle } from "@/components/ui/dialog";
import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from "@/components/ui/form";
import { Input } from "@/components/ui/input";
@@ -18,21 +22,21 @@ const formSchema = customSectionSchema;
type FormValues = z.infer;
-const SECTION_TYPE_OPTIONS: { value: CustomSectionType; label: string }[] = [
- { value: "summary", label: "Summary" },
- { value: "experience", label: "Experience" },
- { value: "education", label: "Education" },
- { value: "projects", label: "Projects" },
- { value: "profiles", label: "Profiles" },
- { value: "skills", label: "Skills" },
- { value: "languages", label: "Languages" },
- { value: "interests", label: "Interests" },
- { value: "awards", label: "Awards" },
- { value: "certifications", label: "Certifications" },
- { value: "publications", label: "Publications" },
- { value: "volunteer", label: "Volunteer" },
- { value: "references", label: "References" },
- { value: "cover-letter", label: "Cover Letter" },
+const SECTION_TYPE_OPTIONS: { value: CustomSectionType; label: MessageDescriptor }[] = [
+ { value: "summary", label: msg`Summary` },
+ { value: "experience", label: msg`Experience` },
+ { value: "education", label: msg`Education` },
+ { value: "projects", label: msg`Projects` },
+ { value: "profiles", label: msg`Profiles` },
+ { value: "skills", label: msg`Skills` },
+ { value: "languages", label: msg`Languages` },
+ { value: "interests", label: msg`Interests` },
+ { value: "awards", label: msg`Awards` },
+ { value: "certifications", label: msg`Certifications` },
+ { value: "publications", label: msg`Publications` },
+ { value: "volunteer", label: msg`Volunteer` },
+ { value: "references", label: msg`References` },
+ { value: "cover-letter", label: msg`Cover Letter` },
];
export function CreateCustomSectionDialog({ data }: DialogProps<"resume.sections.custom.create">) {
@@ -150,6 +154,7 @@ export function UpdateCustomSectionDialog({ data }: DialogProps<"resume.sections
}
function CustomSectionForm({ isUpdate = false }: { isUpdate?: boolean }) {
+ const { i18n } = useLingui();
const form = useFormContext();
return (
@@ -179,17 +184,16 @@ function CustomSectionForm({ isUpdate = false }: { isUpdate?: boolean }) {
Section Type
-
+ onValueChange={field.onChange}
+ options={SECTION_TYPE_OPTIONS.map((option) => ({
+ value: option.value,
+ label: i18n.t(option.label),
+ }))}
+ />
diff --git a/src/routes/$username/$slug.tsx b/src/routes/$username/$slug.tsx
index b7763165f..c981c6fd5 100644
--- a/src/routes/$username/$slug.tsx
+++ b/src/routes/$username/$slug.tsx
@@ -16,18 +16,14 @@ import { cn } from "@/utils/style";
export const Route = createFileRoute("/$username/$slug")({
component: RouteComponent,
loader: async ({ context, params: { username, slug } }) => {
- try {
- // Ignore .well-known requests
- if (username === ".well-known") throw notFound();
+ // Ignore .well-known requests
+ if (username === ".well-known") throw notFound();
- const resume = await context.queryClient.ensureQueryData(
- orpc.resume.getBySlug.queryOptions({ input: { username, slug } }),
- );
+ const resume = await context.queryClient.ensureQueryData(
+ orpc.resume.getBySlug.queryOptions({ input: { username, slug } }),
+ );
- return { resume };
- } catch {
- throw notFound();
- }
+ return { resume };
},
head: ({ loaderData }) => ({
meta: [{ title: loaderData ? `${loaderData.resume.name} - Reactive Resume` : "Reactive Resume" }],
@@ -86,7 +82,7 @@ function RouteComponent() {
size="lg"
variant="secondary"
disabled={isPrinting}
- className="fixed end-4 bottom-4 z-50 hidden rounded-full px-4 md:inline-flex print:hidden"
+ className="fixed inset-e-4 bottom-4 z-50 hidden rounded-full px-4 md:inline-flex print:hidden"
onClick={handleDownload}
>
{isPrinting ? : }