-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fdd8afd
commit d15164d
Showing
10 changed files
with
135 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { cn } from "@/lib/utils"; | ||
import RichText from "../text"; | ||
import { Icons } from "@/components/icons"; | ||
import Link from "next/link"; | ||
|
||
|
||
interface SubPageProps { | ||
block: any; | ||
className?: string | undefined; | ||
} | ||
|
||
export function SubPageRender({ block, className }: SubPageProps) { | ||
const { | ||
id, | ||
child_page: { title }, | ||
} = block; | ||
|
||
// Subpage not in blog list. page ID shouldn't be empty | ||
const slug = `/article/${title}/${id}` | ||
|
||
return ( | ||
<div className={cn(className, "inline-flex w-full items-center flex-wrap")}> | ||
<Icons.textFile className="h-6 w-6 p-[0.8] text-gray-400" /> | ||
<Link | ||
key={id} | ||
href={slug} | ||
className="whitespace-pre-wrap break-words font-semibold truncate underline decoration-slate-300" | ||
> | ||
{title} | ||
</Link> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.