Skip to content

Commit b1755ac

Browse files
committed
Rename custom component from VisualEditing to ContentLink in docs
Update content link documentation to use ContentLink as the custom component name and import the library component as DatoContentLink. This provides clearer naming conventions and avoids confusion between the custom wrapper component and the library component.
1 parent 05cb618 commit b1755ac

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

docs/content-link.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -137,15 +137,15 @@ For full [Web Previews plugin](https://www.datocms.com/marketplace/plugins/i/dat
137137
```jsx
138138
'use client';
139139

140-
import { ContentLink } from 'react-datocms';
140+
import { ContentLink as DatoContentLink } from 'react-datocms';
141141
import { useRouter, usePathname } from 'next/navigation';
142142

143-
export function VisualEditing() {
143+
export function ContentLink() {
144144
const router = useRouter();
145145
const pathname = usePathname();
146146

147147
return (
148-
<ContentLink
148+
<DatoContentLink
149149
onNavigateTo={(path) => router.push(path)}
150150
currentPath={pathname}
151151
/>
@@ -157,13 +157,13 @@ Then include this in your root layout:
157157

158158
```jsx
159159
// app/layout.tsx
160-
import { VisualEditing } from './VisualEditing';
160+
import { ContentLink } from './ContentLink';
161161

162162
export default function RootLayout({ children }) {
163163
return (
164164
<html>
165165
<body>
166-
<VisualEditing />
166+
<ContentLink />
167167
{children}
168168
</body>
169169
</html>
@@ -174,15 +174,15 @@ export default function RootLayout({ children }) {
174174
### React Router
175175

176176
```jsx
177-
import { ContentLink } from 'react-datocms';
177+
import { ContentLink as DatoContentLink } from 'react-datocms';
178178
import { useNavigate, useLocation } from 'react-router-dom';
179179

180-
export function VisualEditing() {
180+
export function ContentLink() {
181181
const navigate = useNavigate();
182182
const location = useLocation();
183183

184184
return (
185-
<ContentLink
185+
<DatoContentLink
186186
onNavigateTo={(path) => navigate(path)}
187187
currentPath={location.pathname}
188188
/>

0 commit comments

Comments
 (0)