Skip to content

Commit fb24697

Browse files
committed
create SandboxContainer component, and replace markup in sandbox.tsx page
1 parent db2c33f commit fb24697

File tree

1 file changed

+7
-15
lines changed

1 file changed

+7
-15
lines changed

polaris.shopify.com/pages/sandbox.tsx

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
import SandboxHeader from '../src/components/SandboxHeader';
2-
import SandboxHelpDialog from '../src/components/SandboxHelpDialog';
31
import {useEffect, useRef, useState} from 'react';
4-
import {useRouter} from 'next/router';
52
import type {InferGetServerSidePropsType, GetServerSideProps} from 'next';
3+
import {useRouter} from 'next/router';
4+
5+
import SandboxHeader from '../src/components/SandboxHeader';
6+
import SandboxHelpDialog from '../src/components/SandboxHelpDialog';
7+
import SandboxContainer from '../src/components/SandboxContainer';
68

79
export const getServerSideProps: GetServerSideProps = async ({query}) => {
810
// We need to pass initial query param to our nested iframe
@@ -70,17 +72,7 @@ export default function Sandbox({
7072
}, [router]);
7173

7274
return (
73-
<div
74-
className="styles-for-site-but-not-polaris-examples"
75-
style={{
76-
display: 'flex',
77-
flexDirection: 'column',
78-
width: '100%',
79-
height: '100vh',
80-
margin: 0,
81-
padding: 0,
82-
}}
83-
>
75+
<SandboxContainer>
8476
<SandboxHeader
8577
setHelpIsOpen={setHelpIsOpen}
8678
url={typeof window !== 'undefined' ? window.location.href : ''}
@@ -98,6 +90,6 @@ export default function Sandbox({
9890
width="100%"
9991
height="100%"
10092
/>
101-
</div>
93+
</SandboxContainer>
10294
);
10395
}

0 commit comments

Comments
 (0)