-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
/
Copy pathcheckout.js
45 lines (44 loc) · 1.04 KB
/
checkout.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import React from 'react';
import Head from 'next/head';
import dynamic from 'next/dynamic';
const CC = dynamic(() => import('../components/test'), { ssr: false });
const Checkout = props => (
<div>
<Head>
<title>checkout</title>
<link rel="icon" href="/nextjs-ssr/checkout/public/favicon.ico" />
</Head>
<div className="hero">
<h1>checkout page</h1>
<CC />
<h3 className="title">This is a federated page owned by localhost:3000</h3>
<span>
{' '}
Data from federated <pre>getInitalProps</pre>
</span>
<br />
<pre>{JSON.stringify(props, null, 2)}</pre>
</div>
<style jsx>{`
.hero {
width: 100%;
color: #333;
}
.title {
margin: 0;
width: 100%;
padding-top: 80px;
line-height: 1.15;
font-size: 20px;
}
.title,
.description {
text-align: center;
}
`}</style>
</div>
);
Checkout.getInitialProps = async () => {
return { test: 123 };
};
export default Checkout;