Skip to content

Commit 55bf0ef

Browse files
committed
[orga-build] add components
1 parent 90e2d21 commit 55bf0ef

File tree

5 files changed

+9
-20
lines changed

5 files changed

+9
-20
lines changed

docs/_layout.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { ReactNode } from 'react'
2+
import { Link } from 'orga-build/components'
23
import './style.css'
34

45
import type { SVGProps } from 'react'
@@ -39,9 +40,9 @@ export default function Layout({ children }: LayoutProps) {
3940
<ol className="flex flex-1 gap-4">
4041
{navItems.map((item) => (
4142
<li key={item.name}>
42-
<a href={item.href} className="btn btn-ghost">
43+
<Link href={item.href} className="btn btn-ghost">
4344
{item.name}
44-
</a>
45+
</Link>
4546
</li>
4647
))}
4748
</ol>
@@ -111,7 +112,7 @@ function renderMenu(path: string, pages: Page[]) {
111112
<ul>
112113
{children.map((child) => (
113114
<li key={child.slug}>
114-
<a href={child.slug}>{child.title}</a>
115+
<Link href={child.slug}>{child.title}</Link>
115116
{renderMenu(child.slug, pages)}
116117
</li>
117118
))}

package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
"daisyui": "^5.0.28",
2121
"orga-build": "workspace:^",
2222
"prettier": "^2.8.8",
23-
"react": "^19.0.0",
24-
"react-dom": "^19.0.0",
2523
"tailwindcss": "^4.0.3",
2624
"turbo": "^1.10.13",
2725
"type-coverage": "^2.29.7",
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { Link } from 'wouter'

packages/orga-build/package.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,19 @@
1313
"types": "./index.d.ts",
1414
"import": "./index.js"
1515
},
16-
"./csr": "./lib/csr.jsx"
16+
"./csr": "./lib/csr.jsx",
17+
"./components": "./lib/components.js"
1718
},
1819
"keywords": ["orgajs", "org-mode", "build", "website", "react"],
1920
"author": "Xiaoxing Hu <[email protected]>",
2021
"license": "MIT",
2122
"dependencies": {
2223
"@orgajs/rollup": "workspace:*",
2324
"@vitejs/plugin-react": "^4.4.0",
24-
"esbuild": "^0.24.2",
2525
"express": "^5.1.0",
2626
"globby": "^14.1.0",
27+
"react": "^19.0.0",
28+
"react-dom": "^19.0.0",
2729
"rehype-katex": "^7.0.1",
2830
"unist-util-visit-parents": "^6.0.1",
2931
"vite": "6.3.2",
@@ -35,9 +37,5 @@
3537
"@types/node": "^22.13.1",
3638
"@types/react": "^19.0.8",
3739
"@types/react-dom": "^19.0.3"
38-
},
39-
"peerDependencies": {
40-
"react": "^19.0.0",
41-
"react-dom": "^19.0.0"
4240
}
4341
}

pnpm-lock.yaml

Lines changed: 0 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)