Skip to content

Commit 3492513

Browse files
committed
fix example
1 parent 35d844b commit 3492513

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
import { OrgaComponents } from '@orgajs/orgx'
1+
import type { OrgaComponents } from '@orgajs/orgx'
22
import Image from 'next/image'
33

4+
// This file is required to use Orga in `app` directory.
45
export function useOrgaComponents(components: OrgaComponents) {
6+
// Allows customizing built-in components, e.g. use next/image.
57
return {
68
...components,
79
img: (props: any) => (
8-
<div>
9-
<pre>{JSON.stringify(props, null, 2)}</pre>
10-
<Image alt={''} sizes="100vw" width={100} height={100} {...props} />
11-
</div>
10+
<Image alt={''} sizes="100vw" width={100} height={100} {...props} />
1211
),
1312
}
1413
}

examples/next-with-app-dir/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
"eslint": "8.39.0",
1717
"eslint-config-next": "13.3.4",
1818
"next": "13.3.2",
19-
"react": "18.2.0",
20-
"react-dom": "18.2.0",
19+
"react": "^18.2.0",
20+
"react-dom": "^18.2.0",
2121
"rehype-pretty-code": "^0.9.5",
2222
"typescript": "5.0.4"
2323
}

0 commit comments

Comments
 (0)