Skip to content

Connect, collaborate, and grow with a community of TypeScript developers

Use markdown fix #553 (#555)

Sean Boult511128359e49
diff --git a/apps/web/src/app/explore/_components/explore-card.tsx b/apps/web/src/app/explore/_components/explore-card.tsx
index ff91bb62..d5ce45ae 100644
--- a/apps/web/src/app/explore/_components/explore-card.tsx
+++ b/apps/web/src/app/explore/_components/explore-card.tsx
@@ -5,6 +5,7 @@ import {
CardHeader,
CardTitle,
DifficultyBadge,
+ Markdown,
} from '@repo/ui';
import { Circle, Diamond, MessageCircle, Plus, Sparkle, ThumbsUp, Triangle } from '@repo/ui/icons';
import type { ExploreChallengeData } from './explore.action';
@@ -102,9 +103,9 @@ export function ExploreCard({ challenge }: ExploreCardProps) {
{getRelativeTime(challenge.updatedAt)}
</div>
</div>
- <CardDescription className="relative h-20 overflow-hidden pb-4">
+ <CardDescription className="relative h-20 pb-4">
<div className="pointer-events-none absolute inset-0 h-full w-full shadow-[inset_0_-1.5rem_1rem_-0.5rem_hsl(var(--card))] duration-300 group-hover/card:shadow-[inset_0_-1.5rem_1rem_-0.5rem_hsl(var(--card-hovered))] group-focus:shadow-[inset_0_-1.5rem_1rem_-0.5rem_hsl(var(--card-hovered))]" />
- {challenge.shortDescription}
+ <Markdown>{challenge.shortDescription}</Markdown>
</CardDescription>
</CardContent>
</Card>
diff --git a/packages/ui/src/components/markdown.tsx b/packages/ui/src/components/markdown.tsx
index 9d7ad6f7..172c9d4b 100644
--- a/packages/ui/src/components/markdown.tsx
+++ b/packages/ui/src/components/markdown.tsx
@@ -78,7 +78,7 @@ export function Markdown({ children, className }: { children: string; className?
{String(children).replace(/\n$/, '')}
</SyntaxHighlighter>
) : (
- <code className="rounded-md border border-zinc-300 bg-neutral-200 p-1 font-mono text-zinc-600 dark:border-zinc-600 dark:bg-zinc-700 dark:text-zinc-300">
+ <code className="rounded-md border border-zinc-300 bg-neutral-200 px-1 py-[0.10rem] font-mono text-xs text-zinc-600 dark:border-zinc-600 dark:bg-zinc-700 dark:text-zinc-300">
{children}
</code>
);