Unverified Commit 96f8455a authored by Taylor Bryant's avatar Taylor Bryant Committed by GitHub

Add names to components in amp example (#12415)

parent f13ca305
export default ({ author }) => ( export default function Byline({ author }) {
<> return (
<div className="byline">By {author}</div> <>
<style jsx>{` <div className="byline">By {author}</div>
.byline { <style jsx>{`
color: green; .byline {
font-weight: bolder; color: green;
} font-weight: bolder;
`}</style> }
</> `}</style>
) </>
)
}
...@@ -6,7 +6,7 @@ export const config = { ...@@ -6,7 +6,7 @@ export const config = {
amp: 'hybrid', amp: 'hybrid',
} }
export default () => { export default function DogPage() {
const isAmp = useAmp() const isAmp = useAmp()
return ( return (
......
...@@ -7,7 +7,7 @@ export const config = { ...@@ -7,7 +7,7 @@ export const config = {
amp: true, amp: true,
} }
export default () => { export default function IndexPage() {
const isAmp = useAmp() const isAmp = useAmp()
return ( 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% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment