Skip to content

Commit b769d1b

Browse files
fix(examples): update link URL in cms-kontent example (vercel#32806)
* fix(examples): update cover image link URL in * chore(examples): remove warning in about import
1 parent 22655a1 commit b769d1b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

examples/cms-kontent/components/cover-image.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export default function CoverImage({ title, src, slug }) {
1717
return (
1818
<div className="sm:mx-0">
1919
{slug ? (
20-
<Link href={slug}>
20+
<Link href={`/posts/${slug}`}>
2121
<a aria-label={title}>{image}</a>
2222
</Link>
2323
) : (

examples/cms-kontent/lib/api.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { DeliveryClient } from '@kentico/kontent-delivery'
2-
import { name, version } from '../package.json'
2+
import pkg from '../package.json'
33

44
const sourceTrackingHeaderName = 'X-KC-SOURCE'
55

@@ -9,7 +9,7 @@ const client = new DeliveryClient({
99
globalHeaders: (_queryConfig) => [
1010
{
1111
header: sourceTrackingHeaderName,
12-
value: `@vercel/next.js/example/${name};${version}`,
12+
value: `@vercel/next.js/example/${pkg.name};${pkg.version}`,
1313
},
1414
],
1515
})

0 commit comments

Comments
 (0)