diff --git a/Components/Plate.tsx b/Components/Plate.tsx
deleted file mode 100644
index 6e583e85..00000000
--- a/Components/Plate.tsx
+++ /dev/null
@@ -1,11 +0,0 @@
-import React from 'react';
-
-const Plate = ({ children }: { children: React.ReactNode }) => {
- return (
-
- );
-};
-
-export default Plate;
diff --git a/Components/Wrapper.tsx b/Components/Wrapper.tsx
new file mode 100644
index 00000000..de1e65c1
--- /dev/null
+++ b/Components/Wrapper.tsx
@@ -0,0 +1,14 @@
+import React from 'react';
+
+const Wrapper = ({ children }: { children: React.ReactNode }) => {
+ return (
+
+ );
+};
+
+export default Wrapper;
diff --git a/app/layout.tsx b/app/layout.tsx
index 4435ed7e..0cdcedf8 100644
--- a/app/layout.tsx
+++ b/app/layout.tsx
@@ -2,6 +2,7 @@ import type { Metadata } from 'next';
import { Inter } from 'next/font/google';
import './globals.css';
import ClientProviders from '@/Components/Provider/ClientProvider';
+import Wrapper from '@/Components/Wrapper';
const inter = Inter({ subsets: ['latin'] });
@@ -18,7 +19,11 @@ export default function RootLayout({
return (
- {children}
+
+
+ {children}
+
+
);
diff --git a/app/open/open.utils.ts b/app/open/open.utils.ts
index e3b7bc41..8554931d 100644
--- a/app/open/open.utils.ts
+++ b/app/open/open.utils.ts
@@ -1,4 +1,4 @@
-export const fetchAllChat = async (token: string) => {
+export const fetchAllChat = async (token: string, userId: string) => {
const res = await fetch('https://fastcampus-chat.net/chat', {
method: 'GET',
headers: {
diff --git a/app/open/page.tsx b/app/open/page.tsx
index 7888ec3e..3e2296b4 100644
--- a/app/open/page.tsx
+++ b/app/open/page.tsx
@@ -1,5 +1,4 @@
import React from 'react';
-import Plate from '@/Components/Plate';
import { fetchAllChat } from './open.utils';
type ChatData = {
@@ -13,20 +12,18 @@ type ChatData = {
const Open = async () => {
const accessToken = process.env.ACCESS_TOKEN as string;
- const result = await fetchAllChat(accessToken);
+ const result = await fetchAllChat(accessToken, 'minseob');
console.log(result);
return (
-
-
- {result.chats.map((chat: ChatData) => {
- return (
-
- );
- })}
-
-
+
+ {result.chats.map((chat: ChatData) => {
+ return (
+
+ );
+ })}
+
);
};
diff --git a/package-lock.json b/package-lock.json
index c4f98e1d..81db7d29 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -15,6 +15,7 @@
"next": "14.0.1",
"react": "^18",
"react-dom": "^18",
+ "react-hook-form": "^7.48.2",
"recoil": "^0.7.7",
"socket.io": "^4.7.2"
},
@@ -4024,6 +4025,21 @@
"react": "^18.2.0"
}
},
+ "node_modules/react-hook-form": {
+ "version": "7.48.2",
+ "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.48.2.tgz",
+ "integrity": "sha512-H0T2InFQb1hX7qKtDIZmvpU1Xfn/bdahWBN1fH19gSe4bBEqTfmlr7H3XWTaVtiK4/tpPaI1F3355GPMZYge+A==",
+ "engines": {
+ "node": ">=12.22.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/react-hook-form"
+ },
+ "peerDependencies": {
+ "react": "^16.8.0 || ^17 || ^18"
+ }
+ },
"node_modules/react-is": {
"version": "16.13.1",
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
diff --git a/package.json b/package.json
index 9180cb2f..85d05aac 100644
--- a/package.json
+++ b/package.json
@@ -17,6 +17,7 @@
"next": "14.0.1",
"react": "^18",
"react-dom": "^18",
+ "react-hook-form": "^7.48.2",
"recoil": "^0.7.7",
"socket.io": "^4.7.2"
},
diff --git a/tailwind.config.ts b/tailwind.config.ts
index 7d89807e..79d51a5f 100644
--- a/tailwind.config.ts
+++ b/tailwind.config.ts
@@ -11,6 +11,11 @@ const config: Config = withMT({
'path-to-your-node_modules/@material-tailwind/react/theme/components/**/*.{js,ts,jsx,tsx}',
],
theme: {
+ screens: {
+ sm: '425px',
+ md: '768px',
+ lg: '1024px',
+ },
extend: {
colors: {
primary: '#FF6363',