Skip to content

Commit b5eec51

Browse files
authored
Merge pull request #70 from techdiary-dev/kingrayhan/profile
feat: update profile page layout and enhance Markdown rendering
2 parents 07fd76d + 9b48900 commit b5eec51

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

src/app/[username]/(profile-page)/layout.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,7 @@ const layout: React.FC<ProfilePageLayoutProps> = async ({
6363

6464
return (
6565
<BaseLayout>
66-
{/* <pre>
67-
{JSON.stringify(
68-
{ currentPath: sanitizedUsername(currentPath!), username },
69-
null,
70-
2
71-
)}
72-
</pre> */}
66+
{/* <pre>{JSON.stringify({ profile }, null, 2)}</pre> */}
7367
<div className="wrapper">
7468
<div className="grid grid-cols-1 gap-6 my-2 lg:my-6 md:grid-cols-12 lg:gap-10">
7569
<aside className="md:col-span-3 col-span-full">

src/app/[username]/(profile-page)/page.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { getUserByUsername } from "@/backend/services/user.action";
22
import _t from "@/i18n/_t";
33
import { markdocParser } from "@/lib/markdown/markdoc-parser";
4+
import Markdown from "@/lib/markdown/Markdown";
45
import Image from "next/image";
56
import React from "react";
67

@@ -19,7 +20,7 @@ const UserProfilePage: React.FC<UserProfilePageProps> = async ({ params }) => {
1920
<main className="border rounded-bl-2xl rounded-br-2xl md:col-span-9 col-span-full">
2021
{profile?.profile_readme ? (
2122
<div className="p-3 content-typography">
22-
{markdocParser(profile?.profile_readme ?? "")}
23+
<Markdown content={profile?.profile_readme} />
2324
</div>
2425
) : (
2526
<div className="py-10 flex flex-col items-center justify-center gap-4">

src/styles/_content-typography.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
@apply prose-h4:text-base;
1414

1515
iframe {
16-
@apply w-full aspect-[16/9];
16+
@apply w-full aspect-video;
1717
}
1818

1919
.table-of-contents {

0 commit comments

Comments
 (0)