Skip to content

Commit b60e6f2

Browse files
authored
Merge pull request #62 from ssu-commerce/SCF-61
Scf 61
2 parents 146340d + 91ee36e commit b60e6f2

File tree

7 files changed

+54
-12
lines changed

7 files changed

+54
-12
lines changed

apps/commerce/app/layout.tsx

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import type { Metadata } from "next";
2-
import StyledJsxProvider from "provider/emotion";
3-
import { ThemeProvider } from "provider/theme";
4-
import { ReactQueryProvider } from "provider/reactQuery";
2+
import Providers from "../providers";
53
import styled from "./root.module.css";
64

75
export const metadata: Metadata = {
@@ -18,14 +16,10 @@ const RootLayout = ({
1816
<html lang="ko">
1917
<head />
2018
<body className={styled.body} suppressHydrationWarning>
21-
<ReactQueryProvider>
22-
<StyledJsxProvider>
23-
<ThemeProvider>
24-
{children}
25-
<div id="portal" />
26-
</ThemeProvider>
27-
</StyledJsxProvider>
28-
</ReactQueryProvider>
19+
<Providers>
20+
{children}
21+
<div id="portal" />
22+
</Providers>
2923
</body>
3024
</html>
3125
);

apps/commerce/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
"react": "^18.2.0",
2626
"react-dom": "^18.2.0",
2727
"react-slick": "^0.29.0",
28-
"slick-carousel": "^1.8.1"
28+
"slick-carousel": "^1.8.1",
29+
"zustand": "^4.5.2"
2930
},
3031
"devDependencies": {
3132
"@next/eslint-plugin-next": "^13.4.19",
File renamed without changes.

apps/commerce/providers/index.tsx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import type { ReactNode } from "react";
2+
import { ReactQueryProvider } from "./reactQuery";
3+
import StyledJsxProvider from "./emotion";
4+
import { ThemeProvider } from "./theme";
5+
6+
const Providers = ({ children }: { children: ReactNode }) => {
7+
return (
8+
<ReactQueryProvider>
9+
<StyledJsxProvider>
10+
<ThemeProvider>{children}</ThemeProvider>
11+
</StyledJsxProvider>
12+
</ReactQueryProvider>
13+
);
14+
};
15+
16+
export default Providers;
File renamed without changes.
File renamed without changes.

pnpm-lock.yaml

Lines changed: 31 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)