Skip to content

Commit

Permalink
feat: edit tagline
Browse files Browse the repository at this point in the history
  • Loading branch information
tomquirk committed Nov 18, 2023
1 parent ed4ce9f commit 309597c
Showing 1 changed file with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ const JUICEBOX_MONEY_METADATA_DOMAIN = 0n

const ProjectGeneralSettingsFormSchema = z
.object({
name: z.string().max(256).min(1, 'Name must be at least 1 character'),
name: z.string().max(256).min(1, "Name can't be empty"),
projectTagline: z.string().max(256).min(1, "Tagline can't be empty"),
introVideo: z.union([z.string().url().optional(), z.literal('')]),
introImage: z.union([z.string().url().optional(), z.literal('')]),
description: z.string(),
Expand Down Expand Up @@ -104,6 +105,7 @@ export const ManageProjectGeneralSettingsPage = () => {
resolver: zodResolver(ProjectGeneralSettingsFormSchema),
defaultValues: {
name: projectData.name,
projectTagline: projectData.projectTagline,
description: projectData.description,
introVideo: projectData.introVideoUrl,
introImage: projectData.introImageUri,
Expand All @@ -127,6 +129,7 @@ export const ManageProjectGeneralSettingsPage = () => {
const metadata: _JBProjectMetadata = {
...projectData._metadata,
name: data.name,
projectTagline: data.projectTagline,
description: data.description,
introVideoUrl: data.introVideo,
introImageUri: data.introImage,
Expand Down Expand Up @@ -164,6 +167,16 @@ export const ManageProjectGeneralSettingsPage = () => {
)}
/>

<FormField
control={form.control}
name="projectTagline"
render={({ field }) => (
<LabeledFormControl label="Tagline">
<Input {...field} />
</LabeledFormControl>
)}
/>

<FormField
control={form.control}
name="introVideo"
Expand Down

1 comment on commit 309597c

@vercel
Copy link

@vercel vercel bot commented on 309597c Nov 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.