Connect, collaborate, and grow with a community of TypeScript developers
Fix #36 (#44)
Sean Boultf66456f57ac2
diff --git a/prisma/challenges.mock.ts b/prisma/challenges.mock.tsindex c9881d80..95619678 100644--- a/prisma/challenges.mock.ts+++ b/prisma/challenges.mock.ts@@ -13,10 +13,10 @@ export const CHALLENGE_MAP: Record<updatedAt: new Date(),Bookmark: randomTrueOrFalse()? {- create: {- userId: randomTrueOrFalse() ? trashId : gId,- },- }+ create: {+ userId: randomTrueOrFalse() ? trashId : gId,+ },+ }: undefined,description: `Implement the built-in \`Pick<T, K>\` generic without using it.@@ -48,7 +48,6 @@ Extends<HelloWorld, \`\${string}!\`>()type HelloWorld =`,difficulty: 'BEGINNER',}),-EASY: (challengeIndex: number) => ({name: `Easy Challenge ${challengeIndex + 1}`,createdAt: new Date(),@@ -87,8 +86,7 @@ type HelloWorld =`,name: `Medium Challenge ${challengeIndex + 1}`,createdAt: new Date(),updatedAt: new Date(),- description: `- Implement the built-in \`Omit<T, K>\` generic without using it.+ description: `Implement the built-in \`Omit<T, K>\` generic without using it.Constructs a type by picking the set of properties \`K\` from \`T\`@@ -121,8 +119,7 @@ type HelloWorld =`,name: `Hard Challenge ${challengeIndex + 1}`,createdAt: new Date(),updatedAt: new Date(),- description: `- Implement a simpiled version of a Vue-like typing support.+ description: `Implement a simpiled version of a Vue-like typing support.By providing a function name \`SimpleVue\` (similar to \`Vue.extend\` or \`defineComponent\`), it should properly infer the \`this\` type inside computed and methods.@@ -171,8 +168,7 @@ type HelloWorld =`,name: `Extreme Challenge ${challengeIndex + 1}`,createdAt: new Date(),updatedAt: new Date(),- description: `-Implement a generic \`GetReadonlyKeys<T>\` that returns a union of the readonly keys of an Object.+ description: `Implement a generic \`GetReadonlyKeys<T>\` that returns a union of the readonly keys of an Object.For examplediff --git a/src/components/challenge/description-panel.tsx b/src/components/challenge/description-panel.tsxindex 2887e147..2ae64794 100644--- a/src/components/challenge/description-panel.tsx+++ b/src/components/challenge/description-panel.tsx@@ -67,6 +67,7 @@ export function DescriptionPanel({ challenge }: Props) {<TabsTrigger value="solutions">Solutions</TabsTrigger></TabsList><TabsContent value="description" className="mt-0">+<div className="h-full p-5"><TypographyH3 className="mb-2 font-medium">{challenge.name}</TypographyH3><div className="mb-6 flex items-center gap-6">@@ -154,13 +155,14 @@ export function DescriptionPanel({ challenge }: Props) {</DialogContent></Dialog></div>- <div className="prose-invert prose-h3:text-xl">+ <div className="prose-invert prose-h3:text-xl leading-8">{/* @ts-ignore */}<ReactMarkdownremarkPlugins={[remarkGfm]}components={{p: ({ ...props }) => <p className="mb-4" {...props} />,code({ inline, className, children, ...props }) {+ console.log(children)const match = /language-(\w+)/.exec(className || '');return !inline && match ? (<SyntaxHighlighter@@ -173,7 +175,7 @@ export function DescriptionPanel({ challenge }: Props) {{String(children).replace(/\n$/, '')}</SyntaxHighlighter>) : (- <code className={className} {...props}>+ <code className="rounded-md p-1 bg-neutral-200 dark:bg-black font-mono">{children}</code>);