Skip to content

Commit 9d7a974

Browse files
committed
各セクションにジャンプする機能追加
1 parent 685b915 commit 9d7a974

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

app/[docs_id]/page.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ export default async function Page({
4141
return (
4242
<div className="p-4">
4343
{splitMdContent.map((section, index) => (
44-
<Section key={index} section={section} />
44+
<div key={index} id={`${index}`}>
45+
<Section key={index} section={section} />
46+
</div>
4547
))}
4648
</div>
4749
);

app/sidebar.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ export function Sidebar() {
6363
{splitmdcontent
6464
.filter(section => section.level !== 1)
6565
.map((section, idx) => (
66-
<li key={idx}>{section.title}</li>
66+
<li key={idx}>
67+
<Link href={`#${idx+1}`}>{section.title}</Link>
68+
</li>
6769
))}
6870
</ul>
6971
)}

app/terminal/python/pyodide.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ export function PyodideProvider({ children }: { children: ReactNode }) {
289289
return output;
290290
});
291291
},
292-
[files]
292+
[files, writeFile]
293293
);
294294

295295
/**

0 commit comments

Comments
 (0)