mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2025-08-29 12:10:22 +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">
|
||||
{guide.title}
|
||||
</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
|
||||
href={`/authors/${guide.author?.slug}`}
|
||||
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 {
|
||||
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 {
|
||||
|
@@ -21,6 +21,10 @@ export interface OfficialGuideDocument {
|
||||
keywords?: string[];
|
||||
};
|
||||
tags?: string[];
|
||||
|
||||
questionCount?: number;
|
||||
questionTopicCount?: number;
|
||||
|
||||
viewCount?: number;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
|
Reference in New Issue
Block a user