未验证 提交 96f8455a 编写于 作者: T Taylor Bryant 提交者: GitHub

Add names to components in amp example (#12415)

上级 f13ca305
export default ({ author }) => (
<>
<div className="byline">By {author}</div>
<style jsx>{`
.byline {
color: green;
font-weight: bolder;
}
`}</style>
</>
)
export default function Byline({ author }) {
return (
<>
<div className="byline">By {author}</div>
<style jsx>{`
.byline {
color: green;
font-weight: bolder;
}
`}</style>
</>
)
}
......@@ -6,7 +6,7 @@ export const config = {
amp: 'hybrid',
}
export default () => {
export default function DogPage() {
const isAmp = useAmp()
return (
......
......@@ -7,7 +7,7 @@ export const config = {
amp: true,
}
export default () => {
export default function IndexPage() {
const isAmp = useAmp()
return (
......
export default () => <p>I'm just a normal old page, no AMP for me</p>
export default function NormalPage() {
return <p>I'm just a normal old page, no AMP for me</p>
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册