Skip to content

Commit e67b3ab

Browse files
Add profile pictures to table of contents
1 parent 63139fd commit e67b3ab

2 files changed

Lines changed: 14 additions & 4 deletions

File tree

src/components/AwesomeArcadeList/Extension/extensionTableOfContents.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { Extension } from "@/scripts/FetchListsFromCMS/types";
22
import React from "react";
33
import Link from "next/link";
44
import { smoothScrollHash } from "@/components/Linkable/Header";
5+
import { AvatarImageRenderer } from "@/components/Blog/Elements";
56

67
export function ExtensionTableOfContents({
78
list,
@@ -13,6 +14,10 @@ export function ExtensionTableOfContents({
1314
{list.map((ext) => (
1415
<li key={ext.repo}>
1516
<Link href={`#${ext.repo}`} onClick={smoothScrollHash}>
17+
<AvatarImageRenderer
18+
url={`https://github.com/${ext.author}.png?size=16`}
19+
name={ext.author}
20+
/>{" "}
1621
{ext.repo}
1722
</Link>
1823
</li>

src/components/AwesomeArcadeList/Tool/toolTableOfContents.tsx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { Tool } from "@/scripts/FetchListsFromCMS/types";
22
import React from "react";
33
import Link from "next/link";
44
import { smoothScrollHash } from "@/components/Linkable/Header";
5+
import { AvatarImageRenderer } from "@/components/Blog/Elements";
56

67
export function ToolTableOfContents({
78
list,
@@ -10,10 +11,14 @@ export function ToolTableOfContents({
1011
}): React.ReactNode {
1112
return (
1213
<ul>
13-
{list.map((ext) => (
14-
<li key={ext.repo}>
15-
<Link href={`#${ext.repo}`} onClick={smoothScrollHash}>
16-
{ext.repo}
14+
{list.map((tool) => (
15+
<li key={tool.repo}>
16+
<Link href={`#${tool.repo}`} onClick={smoothScrollHash}>
17+
<AvatarImageRenderer
18+
url={`https://github.com/${tool.author}.png?size=16`}
19+
name={tool.author}
20+
/>{" "}
21+
{tool.repo}
1722
</Link>
1823
</li>
1924
))}

0 commit comments

Comments
 (0)