From 6568c0c2d12894b259aeb28e39d796d4bf7df9eb Mon Sep 17 00:00:00 2001 From: Jared Schoeny Date: Sat, 18 Jul 2026 14:38:49 -0600 Subject: [PATCH] Update hack description input with example and credits req --- src/components/Hack/HackEditForm.tsx | 9 +++++++-- src/components/Hack/HackSubmitForm.tsx | 9 +++++++-- src/components/Hack/hackFormConstants.ts | 11 +++++++++++ 3 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 src/components/Hack/hackFormConstants.ts diff --git a/src/components/Hack/HackEditForm.tsx b/src/components/Hack/HackEditForm.tsx index 44cb0b6..1eba013 100644 --- a/src/components/Hack/HackEditForm.tsx +++ b/src/components/Hack/HackEditForm.tsx @@ -13,6 +13,7 @@ import Select from "@/components/Primitives/Select"; import type { Database } from "@/types/db"; import type { CatalogTagRow } from "@/types/catalogTag"; import { FiExternalLink } from "react-icons/fi"; +import { HACK_FORM_DESCRIPTION_PLACEHOLDER } from "./hackFormConstants"; interface HackEditFormProps { slug: string; @@ -44,7 +45,7 @@ export default function HackEditForm({ slug, initial, catalogTags, tagsUpdatedAt const MAX_COVERS = 10; const [title, setTitle] = React.useState(initial.title); const [summary, setSummary] = React.useState(initial.summary); - const [description, setDescription] = React.useState(initial.description); + const [description, setDescription] = React.useState(initial.description || HACK_FORM_DESCRIPTION_PLACEHOLDER); const [showMdPreview, setShowMdPreview] = React.useState(false); const [baseRom, setBaseRom] = React.useState(initial.base_rom); const [language, setLanguage] = React.useState(initial.language); @@ -340,12 +341,16 @@ export default function HackEditForm({ slug, initial, catalogTags, tagsUpdatedAt )} +

+ A credits section is required.{" "} + Supports Markdown +

{!showMdPreview ? (