Skip to content

Commit ff3dd19

Browse files
authored
Merge pull request #136 from geulDa/refactor/#135/web-app-accessibility
Refactor: web-app-accessibility 웹앱 공통 사이즈 적용
2 parents 2880f95 + 3355cac commit ff3dd19

File tree

3 files changed

+29
-2
lines changed

3 files changed

+29
-2
lines changed

src/pages/_app.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import '@/shared/icons';
33
import { useState } from 'react';
44
import type { AppProps } from 'next/app';
55
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
6+
import AppLayout from '@/shared/layout/AppLayout';
67

78
export default function App({ Component, pageProps }: AppProps) {
89
const [queryClient] = useState(
@@ -13,12 +14,14 @@ export default function App({ Component, pageProps }: AppProps) {
1314
staleTime: 60 * 1000,
1415
},
1516
},
16-
}),
17+
})
1718
);
1819

1920
return (
2021
<QueryClientProvider client={queryClient}>
21-
<Component {...pageProps} />
22+
<AppLayout>
23+
<Component {...pageProps} />
24+
</AppLayout>
2225
</QueryClientProvider>
2326
);
2427
}

src/shared/layout/AppLayout.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
export default function AppLayout({ children }: { children: React.ReactNode }) {
2+
return (
3+
<div className="app-wrapper">
4+
{children}
5+
</div>
6+
);
7+
}

src/styles/globals.css

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,23 @@ html, body {
1313
font-family: var(--font-sans);
1414
}
1515

16+
.app-wrapper {
17+
width: 100%;
18+
max-width: 402px;
19+
margin: 0 auto;
20+
position: relative;
21+
min-height: 100vh;
22+
background: var(--background);
23+
overflow-x: hidden;
24+
transform: translateZ(0);
25+
}
26+
27+
@media (hover: none) and (pointer: coarse) {
28+
.app-wrapper {
29+
width: 100%;
30+
max-width: none;
31+
}
32+
}
1633

1734
@theme {
1835
/* 메인컬러(MAIN) → mint */

0 commit comments

Comments
 (0)