Skip to content

Commit ee7b585

Browse files
committed
fix import and always show navigation
1 parent fc42bc4 commit ee7b585

2 files changed

Lines changed: 25 additions & 24 deletions

File tree

pages/docs/index.tsx

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useState } from 'react';
1+
import React from 'react';
22
import ReactMarkdown from 'react-markdown';
33
import remarkGfm from 'remark-gfm';
44
import rehypeRaw from 'rehype-raw';
@@ -8,16 +8,14 @@ import { readFileSync } from 'fs';
88
import { join } from 'path';
99
import Head from 'next/head';
1010
import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';
11-
import { oneDark } from 'react-syntax-highlighter/dist/esm/styles/prism';
11+
import { vscDarkPlus } from 'react-syntax-highlighter/dist/cjs/styles/prism';
1212

1313
interface DocsPageProps {
1414
content: string;
1515
headings: Array<{ id: string; text: string; level: number }>;
1616
}
1717

1818
export default function DocsPage({ content, headings }: DocsPageProps) {
19-
const [showToc, setShowToc] = useState(false);
20-
2119
return (
2220
<>
2321
<Head>
@@ -62,22 +60,6 @@ export default function DocsPage({ content, headings }: DocsPageProps) {
6260
}}>
6361
← Back
6462
</a>
65-
<button
66-
onClick={() => setShowToc(!showToc)}
67-
style={{
68-
padding: '0.5rem 1rem',
69-
background: showToc ? '#0052FF' : 'white',
70-
color: showToc ? 'white' : '#0052FF',
71-
border: '1px solid #0052FF',
72-
borderRadius: '8px',
73-
cursor: 'pointer',
74-
fontSize: '0.875rem',
75-
fontWeight: '600',
76-
transition: 'all 0.2s ease'
77-
}}
78-
>
79-
{showToc ? 'Hide' : 'Show'} Navigation
80-
</button>
8163
</div>
8264
</div>
8365

@@ -89,8 +71,7 @@ export default function DocsPage({ content, headings }: DocsPageProps) {
8971
gap: '2rem'
9072
}}>
9173
{/* Table of Contents */}
92-
{showToc && (
93-
<aside style={{
74+
<aside style={{
9475
width: '250px',
9576
flexShrink: 0,
9677
position: 'sticky',
@@ -142,7 +123,6 @@ export default function DocsPage({ content, headings }: DocsPageProps) {
142123
))}
143124
</nav>
144125
</aside>
145-
)}
146126

147127
{/* Main Content */}
148128
<main style={{
@@ -261,7 +241,7 @@ export default function DocsPage({ content, headings }: DocsPageProps) {
261241

262242
return !isInline && match ? (
263243
<SyntaxHighlighter
264-
style={oneDark}
244+
style={vscDarkPlus}
265245
language={match[1]}
266246
PreTag="div"
267247
customStyle={{

pages/index.tsx

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -946,6 +946,27 @@ export default function Home({ initialUsers, error }: Props) {
946946
{showDebugButtons ? 'Hide' : 'Show'} Debug Buttons
947947
</button>
948948
<span style={{ color: '#d1d5db', fontSize: '0.8rem' }}></span>
949+
<button
950+
onClick={() => router.push('/docs')}
951+
style={{
952+
background: 'none',
953+
border: 'none',
954+
color: '#9ca3af',
955+
fontSize: '0.75rem',
956+
cursor: 'pointer',
957+
textDecoration: 'underline',
958+
padding: 0
959+
}}
960+
onMouseEnter={(e) => {
961+
e.currentTarget.style.color = '#1a1a1a';
962+
}}
963+
onMouseLeave={(e) => {
964+
e.currentTarget.style.color = '#9ca3af';
965+
}}
966+
>
967+
Base Verify Docs
968+
</button>
969+
<span style={{ color: '#d1d5db', fontSize: '0.8rem' }}></span>
949970
<button
950971
onClick={() => router.push('/coinbase')}
951972
style={{

0 commit comments

Comments
 (0)