Skip to content

Commit 9e99be1

Browse files
authored
Merge branch 'canary' into bugfix/fix-example-cms-contentful
2 parents 582095b + b562b90 commit 9e99be1

File tree

13 files changed

+71
-75
lines changed

13 files changed

+71
-75
lines changed

errors/no-page-custom-font.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
### Why This Error Occurred
44

55
- The custom font you're adding was added to a page - this only adds the font to the specific page and not the entire application.
6-
- The custom font you're adding was added to a separate component within `Document` - this disables automatic font optimiztion.
6+
- The custom font you're adding was added to a separate component within `Document` - this disables automatic font optimization.
77

88
### Possible Ways to Fix It
99

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
})

examples/with-semantic-ui/.nowignore

Lines changed: 0 additions & 5 deletions
This file was deleted.

examples/with-semantic-ui/next.config.js

Lines changed: 0 additions & 17 deletions
This file was deleted.

examples/with-semantic-ui/package.json

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,10 @@
66
"start": "next start"
77
},
88
"dependencies": {
9-
"next": "^9.1.8-canary.11",
9+
"next": "latest",
1010
"react": "^17.0.2",
1111
"react-dom": "^17.0.2",
1212
"semantic-ui-css": "^2.4.1",
13-
"semantic-ui-react": "^0.84.0"
14-
},
15-
"devDependencies": {
16-
"file-loader": "^3.0.1",
17-
"url-loader": "^1.1.2",
18-
"webpack": "^4.29.0"
13+
"semantic-ui-react": "^2.0.4"
1914
}
2015
}
-7.22 KB
Binary file not shown.
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import 'semantic-ui-css/semantic.min.css'
2-
import './styles.css'
2+
import '../styles/global.css'
33

4-
function MyApp({ Component, pageProps }) {
4+
export default function MyApp({ Component, pageProps }) {
55
return <Component {...pageProps} />
66
}
7-
8-
export default MyApp

examples/with-semantic-ui/pages/index.js

Lines changed: 34 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,46 @@
1-
import { Modal, Button, Icon } from 'semantic-ui-react'
2-
3-
import SmallImage from './SmallImage.png'
4-
import LargeImage from './LargeImage.png'
1+
import Image from 'next/image'
2+
import * as React from 'react'
3+
import { Button, Header, Modal, Icon } from 'semantic-ui-react'
54

65
export default function Home() {
6+
const [open, setOpen] = React.useState(false)
7+
78
return (
89
<div className="centered">
910
<Icon size="massive" name="world" />
1011
<div className="separator" />
11-
<Modal trigger={<Button>Show Modal</Button>}>
12-
<Modal.Header>
13-
<em>publicPath</em> should be set to <em>/_next/static/</em>
14-
</Modal.Header>
15-
<Modal.Content>
12+
<Modal
13+
onClose={() => setOpen(false)}
14+
onOpen={() => setOpen(true)}
15+
open={open}
16+
trigger={<Button>Show Modal</Button>}
17+
>
18+
<Modal.Header>Select a Photo</Modal.Header>
19+
<Modal.Content image>
20+
<span style={{ marginRight: 21 }}>
21+
<Image src="/image.png" width={400} height={266} />
22+
</span>
1623
<Modal.Description>
17-
<div className="wrapper">
18-
<div className="row">
19-
<p>
20-
Larger content should be still available as a fallback to{' '}
21-
<em>fileLoader</em> but it should not pollute{' '}
22-
<em>/.next/static/css</em> folder. You should see two images
23-
below. One, smaller, loaded as data url, and one, bigger,
24-
loaded via url.
25-
</p>
26-
</div>
27-
<div className="row">
28-
<img src={SmallImage} />
29-
<p>
30-
A small image should be loaded as data url:{' '}
31-
<em>{SmallImage.substr(0, 100)}...</em>
32-
</p>
33-
</div>
34-
35-
<div className="row">
36-
<img src={LargeImage} />
37-
<p>
38-
A large image should be loaded as a url: <em>{LargeImage}</em>
39-
</p>
40-
</div>
41-
<p className="border">
42-
You should also still be able to load regular css. This text
43-
should have border.
44-
</p>
45-
</div>
24+
<Header>Default Profile Image</Header>
25+
<p>
26+
We've found the following gravatar image associated with your
27+
e-mail address.
28+
</p>
29+
<p>Is it okay to use this photo?</p>
4630
</Modal.Description>
4731
</Modal.Content>
32+
<Modal.Actions>
33+
<Button color="black" onClick={() => setOpen(false)}>
34+
Nope
35+
</Button>
36+
<Button
37+
content="Yep, that's me"
38+
labelPosition="right"
39+
icon="checkmark"
40+
onClick={() => setOpen(false)}
41+
positive
42+
/>
43+
</Modal.Actions>
4844
</Modal>
4945
</div>
5046
)

0 commit comments

Comments
 (0)