mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2025-09-01 21:32:35 +02:00
wip
This commit is contained in:
@@ -38,7 +38,7 @@ export function GuideContent(props: GuideContentProps) {
|
|||||||
<h1 className="mb-3 text-4xl font-bold text-balance">
|
<h1 className="mb-3 text-4xl font-bold text-balance">
|
||||||
{guide.title}
|
{guide.title}
|
||||||
</h1>
|
</h1>
|
||||||
<p className="my-0 flex items-center justify-start text-sm text-gray-400">
|
<p className="my-0 mb-6 flex items-center justify-start text-sm text-gray-400">
|
||||||
<a
|
<a
|
||||||
href={`/authors/${guide.author?.slug}`}
|
href={`/authors/${guide.author?.slug}`}
|
||||||
className="inline-flex items-center font-medium underline-offset-2 hover:text-gray-600 hover:underline"
|
className="inline-flex items-center font-medium underline-offset-2 hover:text-gray-600 hover:underline"
|
||||||
|
@@ -226,7 +226,17 @@ export class GuideRenderer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private paragraph(node: JSONContent): JSX.Element {
|
private paragraph(node: JSONContent): JSX.Element {
|
||||||
return <p>{node.content ? this.content(node) : <> </>}</p>;
|
const isEmpty =
|
||||||
|
!node.content ||
|
||||||
|
node.content?.every(
|
||||||
|
(child) => child.type === 'text' && child.text === '',
|
||||||
|
);
|
||||||
|
|
||||||
|
if (isEmpty) {
|
||||||
|
return <></>;
|
||||||
|
}
|
||||||
|
|
||||||
|
return <p>{this.content(node)}</p>;
|
||||||
}
|
}
|
||||||
|
|
||||||
private text(node: JSONContent): JSX.Element {
|
private text(node: JSONContent): JSX.Element {
|
||||||
|
@@ -21,6 +21,10 @@ export interface OfficialGuideDocument {
|
|||||||
keywords?: string[];
|
keywords?: string[];
|
||||||
};
|
};
|
||||||
tags?: string[];
|
tags?: string[];
|
||||||
|
|
||||||
|
questionCount?: number;
|
||||||
|
questionTopicCount?: number;
|
||||||
|
|
||||||
viewCount?: number;
|
viewCount?: number;
|
||||||
createdAt: Date;
|
createdAt: Date;
|
||||||
updatedAt: Date;
|
updatedAt: Date;
|
||||||
|
Reference in New Issue
Block a user