Connect, collaborate, and grow with a community of TypeScript developers
fix: solution nesting issue
bautistaaa669aed3119a2
diff --git a/apps/web/src/app/[locale]/challenge/[slug]/solutions/_components/edit-solution.tsx b/apps/web/src/app/[locale]/challenge/[slug]/solutions/_components/edit-solution.tsxindex f004677d..89a5e6ec 100644--- a/apps/web/src/app/[locale]/challenge/[slug]/solutions/_components/edit-solution.tsx+++ b/apps/web/src/app/[locale]/challenge/[slug]/solutions/_components/edit-solution.tsx@@ -13,20 +13,6 @@ import { createNoProfanitySchemaWithValidate } from '~/utils/antiProfanityZod';import type { ChallengeSolution } from '~/app/[locale]/challenge/[slug]/solutions/[solutionId]/page';import { updateSolution } from './_actions';-const getDefaultMarkdown = (solution: string) => `-## Thoughts-<!-- Any thoughts you might like to share about the problem (within ToS, of course). -->--## Approach-<!-- Provide some details on how you approached this challenge. -->---## Code-\`\`\`ts-${solution}-\`\`\`-`;-const formSchema = z.object({title: createNoProfanitySchemaWithValidate((zodString) =>zodString.min(5, 'The title must be longer than 5 characters'),@@ -50,7 +36,7 @@ export function EditSolution({ solution, setIsEditing }: Props) {resolver: zodResolver(formSchema),defaultValues: {title: solution.title,- content: getDefaultMarkdown(solution.description),+ content: solution.description,},});const { toast } = useToast();