From 1f5148f15a522fa9c87eb0a33dbd4978a5249c20 Mon Sep 17 00:00:00 2001 From: Jisu <92006284+jsomnium@users.noreply.github.com> Date: Fri, 27 Sep 2024 03:54:10 +0900 Subject: [PATCH 01/25] =?UTF-8?q?docs:=20=ED=8F=B4=EB=8D=94=20=EA=B5=AC?= =?UTF-8?q?=EC=A1=B0=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 46 +++++++++++++++++++++--------------------- package.json | 8 +++++--- src/App.css | 38 ---------------------------------- src/App.tsx | 1 - src/data/chatData.json | 17 ++++++++++++++++ src/pages/chatList.tsx | 0 src/pages/chatRoom.tsx | 0 7 files changed, 45 insertions(+), 65 deletions(-) delete mode 100644 src/App.css create mode 100644 src/data/chatData.json create mode 100644 src/pages/chatList.tsx create mode 100644 src/pages/chatRoom.tsx diff --git a/package-lock.json b/package-lock.json index c27bbe4e..7858206e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,13 +13,15 @@ "@testing-library/user-event": "^13.5.0", "@types/jest": "^27.5.2", "@types/node": "^16.18.91", - "@types/react": "^18.2.69", "@types/react-dom": "^18.2.22", - "react": "^18.2.0", - "react-dom": "^18.2.0", + "react": "^18.3.1", + "react-dom": "^18.3.1", "react-scripts": "5.0.1", "typescript": "^4.9.5", "web-vitals": "^2.1.4" + }, + "devDependencies": { + "@types/react": "^18.3.9" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -4210,12 +4212,12 @@ "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==" }, "node_modules/@types/react": { - "version": "18.2.69", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.69.tgz", - "integrity": "sha512-W1HOMUWY/1Yyw0ba5TkCV+oqynRjG7BnteBB+B7JmAK7iw3l2SW+VGOxL+akPweix6jk2NNJtyJKpn4TkpfK3Q==", + "version": "18.3.9", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.9.tgz", + "integrity": "sha512-+BpAVyTpJkNWWSSnaLBk6ePpHLOGJKnEQNbINNovPWzvEUyAe3e+/d494QdEh71RekM/qV7lw6jzf1HGrJyAtQ==", + "license": "MIT", "dependencies": { "@types/prop-types": "*", - "@types/scheduler": "*", "csstype": "^3.0.2" } }, @@ -4240,11 +4242,6 @@ "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.0.tgz", "integrity": "sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==" }, - "node_modules/@types/scheduler": { - "version": "0.16.8", - "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.8.tgz", - "integrity": "sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A==" - }, "node_modules/@types/semver": { "version": "7.5.8", "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", @@ -14686,9 +14683,10 @@ } }, "node_modules/react": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", - "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", + "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", + "license": "MIT", "dependencies": { "loose-envify": "^1.1.0" }, @@ -14835,15 +14833,16 @@ } }, "node_modules/react-dom": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", - "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", + "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", + "license": "MIT", "dependencies": { "loose-envify": "^1.1.0", - "scheduler": "^0.23.0" + "scheduler": "^0.23.2" }, "peerDependencies": { - "react": "^18.2.0" + "react": "^18.3.1" } }, "node_modules/react-error-overlay": { @@ -15480,9 +15479,10 @@ } }, "node_modules/scheduler": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", - "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==", + "version": "0.23.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", + "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", + "license": "MIT", "dependencies": { "loose-envify": "^1.1.0" } diff --git a/package.json b/package.json index ea335d36..71e4ce58 100644 --- a/package.json +++ b/package.json @@ -8,10 +8,9 @@ "@testing-library/user-event": "^13.5.0", "@types/jest": "^27.5.2", "@types/node": "^16.18.91", - "@types/react": "^18.2.69", "@types/react-dom": "^18.2.22", - "react": "^18.2.0", - "react-dom": "^18.2.0", + "react": "^18.3.1", + "react-dom": "^18.3.1", "react-scripts": "5.0.1", "typescript": "^4.9.5", "web-vitals": "^2.1.4" @@ -39,5 +38,8 @@ "last 1 firefox version", "last 1 safari version" ] + }, + "devDependencies": { + "@types/react": "^18.3.9" } } diff --git a/src/App.css b/src/App.css deleted file mode 100644 index 74b5e053..00000000 --- a/src/App.css +++ /dev/null @@ -1,38 +0,0 @@ -.App { - text-align: center; -} - -.App-logo { - height: 40vmin; - pointer-events: none; -} - -@media (prefers-reduced-motion: no-preference) { - .App-logo { - animation: App-logo-spin infinite 20s linear; - } -} - -.App-header { - background-color: #282c34; - min-height: 100vh; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - font-size: calc(10px + 2vmin); - color: white; -} - -.App-link { - color: #61dafb; -} - -@keyframes App-logo-spin { - from { - transform: rotate(0deg); - } - to { - transform: rotate(360deg); - } -} diff --git a/src/App.tsx b/src/App.tsx index 5381007b..14b0c705 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,7 +1,6 @@ function App() { return (
-

20기 프론트엔드 파이팅!!! 디자인과 사이좋게 지내요~~~

); } diff --git a/src/data/chatData.json b/src/data/chatData.json new file mode 100644 index 00000000..0cfa5c26 --- /dev/null +++ b/src/data/chatData.json @@ -0,0 +1,17 @@ +{ + "users": [ + { + "user_id": "", + "name": "", + "profile_picture": "" + } + ], + "messages": [ + { + "message_id": "1", + "sender_id": "", + "message": "", + "timestamp": "" + } + ] +} diff --git a/src/pages/chatList.tsx b/src/pages/chatList.tsx new file mode 100644 index 00000000..e69de29b diff --git a/src/pages/chatRoom.tsx b/src/pages/chatRoom.tsx new file mode 100644 index 00000000..e69de29b From 8cd88155c43a89a2ffb10d4afd19d55e763ce9df Mon Sep 17 00:00:00 2001 From: Jisu <92006284+jsomnium@users.noreply.github.com> Date: Fri, 27 Sep 2024 19:34:25 +0900 Subject: [PATCH 02/25] =?UTF-8?q?feat:=20=EA=B8=B0=EB=B3=B8=20=ED=99=94?= =?UTF-8?q?=EB=A9=B4=20=EC=84=A4=EC=A0=95,=20=EC=B1=84=ED=8C=85=EB=B0=A9?= =?UTF-8?q?=20=EB=9D=BC=EC=9A=B0=ED=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 42 +++++++++++++++++++++++++++++++++++++++++ package.json | 1 + public/favicon.ico | Bin 3870 -> 0 bytes public/htmlStyle.css | 24 +++++++++++++++++++++++ public/index.html | 34 ++------------------------------- public/logo192.png | Bin 5347 -> 0 bytes public/logo512.png | Bin 9664 -> 0 bytes public/manifest.json | 25 ------------------------ public/robots.txt | 3 --- src/App.tsx | 12 ++++++++++-- src/index.css | 13 ------------- src/index.tsx | 1 - src/pages/chatList.tsx | 1 + src/pages/chatRoom.tsx | 12 ++++++++++++ 14 files changed, 92 insertions(+), 76 deletions(-) delete mode 100644 public/favicon.ico create mode 100644 public/htmlStyle.css delete mode 100644 public/logo192.png delete mode 100644 public/logo512.png delete mode 100644 public/manifest.json delete mode 100644 public/robots.txt delete mode 100644 src/index.css diff --git a/package-lock.json b/package-lock.json index 7858206e..f4daad8b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,6 +16,7 @@ "@types/react-dom": "^18.2.22", "react": "^18.3.1", "react-dom": "^18.3.1", + "react-router-dom": "^6.26.2", "react-scripts": "5.0.1", "typescript": "^4.9.5", "web-vitals": "^2.1.4" @@ -3340,6 +3341,15 @@ } } }, + "node_modules/@remix-run/router": { + "version": "1.19.2", + "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.19.2.tgz", + "integrity": "sha512-baiMx18+IMuD1yyvOGaHM9QrVUPGGG0jC+z+IPHnRJWUAUvaKuWKyE8gjDj2rzv3sz9zOGoRSPgeBVHRhZnBlA==", + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/@rollup/plugin-babel": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz", @@ -14863,6 +14873,38 @@ "node": ">=0.10.0" } }, + "node_modules/react-router": { + "version": "6.26.2", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.26.2.tgz", + "integrity": "sha512-tvN1iuT03kHgOFnLPfLJ8V95eijteveqdOSk+srqfePtQvqCExB8eHOYnlilbOcyJyKnYkr1vJvf7YqotAJu1A==", + "license": "MIT", + "dependencies": { + "@remix-run/router": "1.19.2" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "react": ">=16.8" + } + }, + "node_modules/react-router-dom": { + "version": "6.26.2", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.26.2.tgz", + "integrity": "sha512-z7YkaEW0Dy35T3/QKPYB1LjMK2R1fxnHO8kWpUMTBdfVzZrWOiY9a7CtN8HqdWtDUWd5FY6Dl8HFsqVwH4uOtQ==", + "license": "MIT", + "dependencies": { + "@remix-run/router": "1.19.2", + "react-router": "6.26.2" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "react": ">=16.8", + "react-dom": ">=16.8" + } + }, "node_modules/react-scripts": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/react-scripts/-/react-scripts-5.0.1.tgz", diff --git a/package.json b/package.json index 71e4ce58..64761e5c 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "@types/react-dom": "^18.2.22", "react": "^18.3.1", "react-dom": "^18.3.1", + "react-router-dom": "^6.26.2", "react-scripts": "5.0.1", "typescript": "^4.9.5", "web-vitals": "^2.1.4" diff --git a/public/favicon.ico b/public/favicon.ico deleted file mode 100644 index a11777cc471a4344702741ab1c8a588998b1311a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3870 zcma);c{J4h9>;%nil|2-o+rCuEF-(I%-F}ijC~o(k~HKAkr0)!FCj~d>`RtpD?8b; zXOC1OD!V*IsqUwzbMF1)-gEDD=A573Z-&G7^LoAC9|WO7Xc0Cx1g^Zu0u_SjAPB3vGa^W|sj)80f#V0@M_CAZTIO(t--xg= z!sii`1giyH7EKL_+Wi0ab<)&E_0KD!3Rp2^HNB*K2@PHCs4PWSA32*-^7d{9nH2_E zmC{C*N*)(vEF1_aMamw2A{ZH5aIDqiabnFdJ|y0%aS|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G$}-zVvCqF1;H;abAu6G*+PDHSYFx@Tdbfox*uEd3}BUyYY-l zTfEsOqsi#f9^FoLO;ChK<554qkri&Av~SIM*{fEYRE?vH7pTAOmu2pz3X?Wn*!ROX ztd54huAk&mFBemMooL33RV-*1f0Q3_(7hl$<#*|WF9P!;r;4_+X~k~uKEqdzZ$5Al zV63XN@)j$FN#cCD;ek1R#l zv%pGrhB~KWgoCj%GT?%{@@o(AJGt*PG#l3i>lhmb_twKH^EYvacVY-6bsCl5*^~L0 zonm@lk2UvvTKr2RS%}T>^~EYqdL1q4nD%0n&Xqr^cK^`J5W;lRRB^R-O8b&HENO||mo0xaD+S=I8RTlIfVgqN@SXDr2&-)we--K7w= zJVU8?Z+7k9dy;s;^gDkQa`0nz6N{T?(A&Iz)2!DEecLyRa&FI!id#5Z7B*O2=PsR0 zEvc|8{NS^)!d)MDX(97Xw}m&kEO@5jqRaDZ!+%`wYOI<23q|&js`&o4xvjP7D_xv@ z5hEwpsp{HezI9!~6O{~)lLR@oF7?J7i>1|5a~UuoN=q&6N}EJPV_GD`&M*v8Y`^2j zKII*d_@Fi$+i*YEW+Hbzn{iQk~yP z>7N{S4)r*!NwQ`(qcN#8SRQsNK6>{)X12nbF`*7#ecO7I)Q$uZsV+xS4E7aUn+U(K baj7?x%VD!5Cxk2YbYLNVeiXvvpMCWYo=by@ diff --git a/public/htmlStyle.css b/public/htmlStyle.css new file mode 100644 index 00000000..b4665fe5 --- /dev/null +++ b/public/htmlStyle.css @@ -0,0 +1,24 @@ +/* 페이지 전체를 가운데 정렬하고 배경색을 핑크로 설정 */ +html, +body { + height: 100%; + width: 100%; + margin: 0; + padding: 0; + display: flex; + justify-content: center; + align-items: center; +} + +/* 화면의 최대 가로폭과 세로폭 설정 */ +#root { + width: 100%; + max-width: 375px; + height: 100%; + max-height: 812px; + border-radius: 20px; /* 둥근 모서리 */ + box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); + display: flex; + flex-direction: column; + overflow: hidden; /* 넘는 부분 숨기기 */ +} \ No newline at end of file diff --git a/public/index.html b/public/index.html index aa069f27..c2dcc3e6 100644 --- a/public/index.html +++ b/public/index.html @@ -2,42 +2,12 @@ - - - - - - - + React App -
- + diff --git a/public/logo192.png b/public/logo192.png deleted file mode 100644 index fc44b0a3796c0e0a64c3d858ca038bd4570465d9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5347 zcmZWtbyO6NvR-oO24RV%BvuJ&=?+<7=`LvyB&A_#M7mSDYw1v6DJkiYl9XjT!%$dLEBTQ8R9|wd3008in6lFF3GV-6mLi?MoP_y~}QUnaDCHI#t z7w^m$@6DI)|C8_jrT?q=f8D?0AM?L)Z}xAo^e^W>t$*Y0KlT5=@bBjT9kxb%-KNdk zeOS1tKO#ChhG7%{ApNBzE2ZVNcxbrin#E1TiAw#BlUhXllzhN$qWez5l;h+t^q#Eav8PhR2|T}y5kkflaK`ba-eoE+Z2q@o6P$)=&` z+(8}+-McnNO>e#$Rr{32ngsZIAX>GH??tqgwUuUz6kjns|LjsB37zUEWd|(&O!)DY zQLrq%Y>)Y8G`yYbYCx&aVHi@-vZ3|ebG!f$sTQqMgi0hWRJ^Wc+Ibv!udh_r%2|U) zPi|E^PK?UE!>_4`f`1k4hqqj_$+d!EB_#IYt;f9)fBOumGNyglU(ofY`yHq4Y?B%- zp&G!MRY<~ajTgIHErMe(Z8JG*;D-PJhd@RX@QatggM7+G(Lz8eZ;73)72Hfx5KDOE zkT(m}i2;@X2AT5fW?qVp?@WgN$aT+f_6eo?IsLh;jscNRp|8H}Z9p_UBO^SJXpZew zEK8fz|0Th%(Wr|KZBGTM4yxkA5CFdAj8=QSrT$fKW#tweUFqr0TZ9D~a5lF{)%-tTGMK^2tz(y2v$i%V8XAxIywrZCp=)83p(zIk6@S5AWl|Oa2hF`~~^W zI;KeOSkw1O#TiQ8;U7OPXjZM|KrnN}9arP)m0v$c|L)lF`j_rpG(zW1Qjv$=^|p*f z>)Na{D&>n`jOWMwB^TM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ATu<;8xA7zX}7|B6mN diff --git a/public/manifest.json b/public/manifest.json deleted file mode 100644 index 080d6c77..00000000 --- a/public/manifest.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "short_name": "React App", - "name": "Create React App Sample", - "icons": [ - { - "src": "favicon.ico", - "sizes": "64x64 32x32 24x24 16x16", - "type": "image/x-icon" - }, - { - "src": "logo192.png", - "type": "image/png", - "sizes": "192x192" - }, - { - "src": "logo512.png", - "type": "image/png", - "sizes": "512x512" - } - ], - "start_url": ".", - "display": "standalone", - "theme_color": "#000000", - "background_color": "#ffffff" -} diff --git a/public/robots.txt b/public/robots.txt deleted file mode 100644 index e9e57dc4..00000000 --- a/public/robots.txt +++ /dev/null @@ -1,3 +0,0 @@ -# https://www.robotstxt.org/robotstxt.html -User-agent: * -Disallow: diff --git a/src/App.tsx b/src/App.tsx index 14b0c705..d36049db 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,7 +1,15 @@ +import React from 'react'; +import { BrowserRouter as Router, Route, Routes } from 'react-router-dom'; +import ChatRoom from '../src/pages/chatRoom'; + function App() { return ( -
-
+ + + } /> + {/* 기본 경로: ChatRoom */} + + ); } diff --git a/src/index.css b/src/index.css deleted file mode 100644 index ec2585e8..00000000 --- a/src/index.css +++ /dev/null @@ -1,13 +0,0 @@ -body { - margin: 0; - font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', - 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', - sans-serif; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -code { - font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', - monospace; -} diff --git a/src/index.tsx b/src/index.tsx index d10be77d..3b193169 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,6 +1,5 @@ import React from 'react'; import ReactDOM from 'react-dom/client'; -import './index.css'; import App from './App'; const root = ReactDOM.createRoot( diff --git a/src/pages/chatList.tsx b/src/pages/chatList.tsx index e69de29b..693da49f 100644 --- a/src/pages/chatList.tsx +++ b/src/pages/chatList.tsx @@ -0,0 +1 @@ +export {} \ No newline at end of file diff --git a/src/pages/chatRoom.tsx b/src/pages/chatRoom.tsx index e69de29b..180310fe 100644 --- a/src/pages/chatRoom.tsx +++ b/src/pages/chatRoom.tsx @@ -0,0 +1,12 @@ +import React from 'react'; + +const ChatRoom: React.FC = () => { + return ( +
+

채팅방

+

내용 표시

+
+ ); +}; + +export default ChatRoom; \ No newline at end of file From 1e73df5e8db28282bd139c3768acecc9e8d648e4 Mon Sep 17 00:00:00 2001 From: Jisu <92006284+jsomnium@users.noreply.github.com> Date: Fri, 27 Sep 2024 20:27:35 +0900 Subject: [PATCH 03/25] =?UTF-8?q?feat,=20design:=20=EA=B8=B0=EB=B3=B8=20UI?= =?UTF-8?q?=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 108 ++++++++++++++++------------- package.json | 5 +- public/htmlStyle.css | 6 +- src/assets/backArrowImg.svg | 3 + src/assets/defaultProfileImg.svg | 4 ++ src/assets/morePointImg.svg | 5 ++ src/components/dateDivider.tsx | 9 +++ src/components/myMessageBox.tsx | 9 +++ src/components/navBar.tsx | 9 +++ src/components/otherMessageBox.tsx | 9 +++ src/components/plusButton.tsx | 9 +++ src/components/profileButton.tsx | 9 +++ src/pages/chatRoom.tsx | 31 +++++++-- tailwind.config.js | 13 ++++ 14 files changed, 170 insertions(+), 59 deletions(-) create mode 100644 src/assets/backArrowImg.svg create mode 100644 src/assets/defaultProfileImg.svg create mode 100644 src/assets/morePointImg.svg create mode 100644 src/components/dateDivider.tsx create mode 100644 src/components/myMessageBox.tsx create mode 100644 src/components/navBar.tsx create mode 100644 src/components/otherMessageBox.tsx create mode 100644 src/components/plusButton.tsx create mode 100644 src/components/profileButton.tsx create mode 100644 tailwind.config.js diff --git a/package-lock.json b/package-lock.json index f4daad8b..7d14648c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,6 +14,8 @@ "@types/jest": "^27.5.2", "@types/node": "^16.18.91", "@types/react-dom": "^18.2.22", + "autoprefixer": "^10.4.20", + "postcss": "^8.4.47", "react": "^18.3.1", "react-dom": "^18.3.1", "react-router-dom": "^6.26.2", @@ -22,7 +24,8 @@ "web-vitals": "^2.1.4" }, "devDependencies": { - "@types/react": "^18.3.9" + "@types/react": "^18.3.9", + "tailwindcss": "^3.4.13" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -5152,9 +5155,9 @@ } }, "node_modules/autoprefixer": { - "version": "10.4.19", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.19.tgz", - "integrity": "sha512-BaENR2+zBZ8xXhM4pUaKUxlVdxZ0EZhjvbopwnXmxRUfqDmwSpC2lAi/QXvx7NRdPCo1WKEcEF6mV64si1z4Ew==", + "version": "10.4.20", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.20.tgz", + "integrity": "sha512-XY25y5xSv/wEoqzDyXXME4AFfkZI0P23z6Fs3YgymDnKJkCGOnkL0iTxCa85UTqaSgfcqyf3UA6+c7wUvx/16g==", "funding": [ { "type": "opencollective", @@ -5169,12 +5172,13 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "dependencies": { - "browserslist": "^4.23.0", - "caniuse-lite": "^1.0.30001599", + "browserslist": "^4.23.3", + "caniuse-lite": "^1.0.30001646", "fraction.js": "^4.3.7", "normalize-range": "^0.1.2", - "picocolors": "^1.0.0", + "picocolors": "^1.0.1", "postcss-value-parser": "^4.2.0" }, "bin": { @@ -5641,9 +5645,9 @@ "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==" }, "node_modules/browserslist": { - "version": "4.23.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz", - "integrity": "sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.0.tgz", + "integrity": "sha512-Rmb62sR1Zpjql25eSanFGEhAxcFwfA1K0GuQcLoaJBAcENegrQut3hYdhXFF1obQfiDyqIW/cLM5HSJ/9k884A==", "funding": [ { "type": "opencollective", @@ -5658,11 +5662,12 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "dependencies": { - "caniuse-lite": "^1.0.30001587", - "electron-to-chromium": "^1.4.668", - "node-releases": "^2.0.14", - "update-browserslist-db": "^1.0.13" + "caniuse-lite": "^1.0.30001663", + "electron-to-chromium": "^1.5.28", + "node-releases": "^2.0.18", + "update-browserslist-db": "^1.1.0" }, "bin": { "browserslist": "cli.js" @@ -5769,9 +5774,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001600", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001600.tgz", - "integrity": "sha512-+2S9/2JFhYmYaDpZvo0lKkfvuKIglrx68MwOBqMGHhQsNkLjB5xtc/TGoEPs+MxjSyN/72qer2g97nzR641mOQ==", + "version": "1.0.30001664", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001664.tgz", + "integrity": "sha512-AmE7k4dXiNKQipgn7a2xg558IRqPN3jMQY/rOsbxDhrd0tyChwbITBfiwtnqz8bi2M5mIWbxAYBvk7W7QBUS2g==", "funding": [ { "type": "opencollective", @@ -5785,7 +5790,8 @@ "type": "github", "url": "https://github.com/sponsors/ai" } - ] + ], + "license": "CC-BY-4.0" }, "node_modules/case-sensitive-paths-webpack-plugin": { "version": "2.4.0", @@ -7025,9 +7031,10 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.715", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.715.tgz", - "integrity": "sha512-XzWNH4ZSa9BwVUQSDorPWAUQ5WGuYz7zJUNpNif40zFCiCl20t8zgylmreNmn26h5kiyw2lg7RfTmeMBsDklqg==" + "version": "1.5.29", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.29.tgz", + "integrity": "sha512-PF8n2AlIhCKXQ+gTpiJi0VhcHDb69kYX4MtCiivctc2QD3XuNZ/XIOlbGzt7WAjjEev0TtaH6Cu3arZExm5DOw==", + "license": "ISC" }, "node_modules/emittery": { "version": "0.8.1", @@ -7277,9 +7284,10 @@ } }, "node_modules/escalade": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", - "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "license": "MIT", "engines": { "node": ">=6" } @@ -12626,9 +12634,10 @@ "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==" }, "node_modules/node-releases": { - "version": "2.0.14", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", - "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==" + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", + "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", + "license": "MIT" }, "node_modules/normalize-path": { "version": "3.0.0", @@ -13099,9 +13108,10 @@ "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==" }, "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz", + "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==", + "license": "ISC" }, "node_modules/picomatch": { "version": "2.3.1", @@ -13265,9 +13275,9 @@ } }, "node_modules/postcss": { - "version": "8.4.38", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", - "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==", + "version": "8.4.47", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.47.tgz", + "integrity": "sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==", "funding": [ { "type": "opencollective", @@ -13282,10 +13292,11 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "dependencies": { "nanoid": "^3.3.7", - "picocolors": "^1.0.0", - "source-map-js": "^1.2.0" + "picocolors": "^1.1.0", + "source-map-js": "^1.2.1" }, "engines": { "node": "^10 || ^12 || >=14" @@ -15847,9 +15858,10 @@ } }, "node_modules/source-map-js": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", - "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } @@ -16533,9 +16545,10 @@ "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==" }, "node_modules/tailwindcss": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.1.tgz", - "integrity": "sha512-qAYmXRfk3ENzuPBakNK0SRrUDipP8NQnEY6772uDhflcQz5EhRdD7JNZxyrFHVQNCwULPBn6FNPp9brpO7ctcA==", + "version": "3.4.13", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.13.tgz", + "integrity": "sha512-KqjHOJKogOUt5Bs752ykCeiwvi0fKVkr5oqsFNt/8px/tA8scFPIlkygsf6jXrfCqGHz7VflA6+yytWuM+XhFw==", + "license": "MIT", "dependencies": { "@alloc/quick-lru": "^5.2.0", "arg": "^5.0.2", @@ -16545,7 +16558,7 @@ "fast-glob": "^3.3.0", "glob-parent": "^6.0.2", "is-glob": "^4.0.3", - "jiti": "^1.19.1", + "jiti": "^1.21.0", "lilconfig": "^2.1.0", "micromatch": "^4.0.5", "normalize-path": "^3.0.0", @@ -17086,9 +17099,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", - "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz", + "integrity": "sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==", "funding": [ { "type": "opencollective", @@ -17103,9 +17116,10 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" + "escalade": "^3.2.0", + "picocolors": "^1.1.0" }, "bin": { "update-browserslist-db": "cli.js" diff --git a/package.json b/package.json index 64761e5c..df862a9b 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,8 @@ "@types/jest": "^27.5.2", "@types/node": "^16.18.91", "@types/react-dom": "^18.2.22", + "autoprefixer": "^10.4.20", + "postcss": "^8.4.47", "react": "^18.3.1", "react-dom": "^18.3.1", "react-router-dom": "^6.26.2", @@ -41,6 +43,7 @@ ] }, "devDependencies": { - "@types/react": "^18.3.9" + "@types/react": "^18.3.9", + "tailwindcss": "^3.4.13" } } diff --git a/public/htmlStyle.css b/public/htmlStyle.css index b4665fe5..ac27156a 100644 --- a/public/htmlStyle.css +++ b/public/htmlStyle.css @@ -1,4 +1,3 @@ -/* 페이지 전체를 가운데 정렬하고 배경색을 핑크로 설정 */ html, body { height: 100%; @@ -10,15 +9,14 @@ body { align-items: center; } -/* 화면의 최대 가로폭과 세로폭 설정 */ #root { width: 100%; max-width: 375px; height: 100%; max-height: 812px; - border-radius: 20px; /* 둥근 모서리 */ + border-radius: 20px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); display: flex; flex-direction: column; - overflow: hidden; /* 넘는 부분 숨기기 */ + overflow: hidden; } \ No newline at end of file diff --git a/src/assets/backArrowImg.svg b/src/assets/backArrowImg.svg new file mode 100644 index 00000000..383ab793 --- /dev/null +++ b/src/assets/backArrowImg.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/defaultProfileImg.svg b/src/assets/defaultProfileImg.svg new file mode 100644 index 00000000..3b072888 --- /dev/null +++ b/src/assets/defaultProfileImg.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/assets/morePointImg.svg b/src/assets/morePointImg.svg new file mode 100644 index 00000000..0e50923c --- /dev/null +++ b/src/assets/morePointImg.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/components/dateDivider.tsx b/src/components/dateDivider.tsx new file mode 100644 index 00000000..bbb99a10 --- /dev/null +++ b/src/components/dateDivider.tsx @@ -0,0 +1,9 @@ +const dateDivider: React.FC = () => { + return ( +
+ 2024.09.11 수요일 +
+ ); +}; + +export default dateDivider; \ No newline at end of file diff --git a/src/components/myMessageBox.tsx b/src/components/myMessageBox.tsx new file mode 100644 index 00000000..b7a485ec --- /dev/null +++ b/src/components/myMessageBox.tsx @@ -0,0 +1,9 @@ +const myMessageBox: React.FC = () => { + return ( +
+ 내가 보낸 메세지 +
+ ); +}; + +export default myMessageBox; \ No newline at end of file diff --git a/src/components/navBar.tsx b/src/components/navBar.tsx new file mode 100644 index 00000000..4ea4a656 --- /dev/null +++ b/src/components/navBar.tsx @@ -0,0 +1,9 @@ +const navBar: React.FC = () => { + return ( +
+ navBar : 시간, 와이파이 등 +
+ ); +}; + +export default navBar; \ No newline at end of file diff --git a/src/components/otherMessageBox.tsx b/src/components/otherMessageBox.tsx new file mode 100644 index 00000000..feaa5979 --- /dev/null +++ b/src/components/otherMessageBox.tsx @@ -0,0 +1,9 @@ +const otherMessageBox: React.FC = () => { + return ( +
+ 상대가 보낸 메세지: 프로필 사진까지 같이 옴 +
+ ); +}; + +export default otherMessageBox; \ No newline at end of file diff --git a/src/components/plusButton.tsx b/src/components/plusButton.tsx new file mode 100644 index 00000000..06f89d15 --- /dev/null +++ b/src/components/plusButton.tsx @@ -0,0 +1,9 @@ +const PlusButton: React.FC = () => { + return ( + + ); +}; + +export default PlusButton; \ No newline at end of file diff --git a/src/components/profileButton.tsx b/src/components/profileButton.tsx new file mode 100644 index 00000000..5a8bde06 --- /dev/null +++ b/src/components/profileButton.tsx @@ -0,0 +1,9 @@ +const profileButton: React.FC = () => { + return ( +
+ profileButton +
+ ); +}; + +export default profileButton; \ No newline at end of file diff --git a/src/pages/chatRoom.tsx b/src/pages/chatRoom.tsx index 180310fe..13feaeef 100644 --- a/src/pages/chatRoom.tsx +++ b/src/pages/chatRoom.tsx @@ -1,12 +1,29 @@ import React from 'react'; +import NavBar from '../components/navBar'; +import DateDivider from '../components/dateDivider'; +import MyMessageBox from '../components/myMessageBox'; +import OtherMessageBox from '../components/otherMessageBox'; +import ProfileButton from '../components/profileButton'; +import PlusButton from '../components/plusButton'; const ChatRoom: React.FC = () => { - return ( -
-

채팅방

-

내용 표시

-
- ); + return ( +
+ +
+ 백버튼 김나나 점 +
+
+ + + + +
+
+ +
+
+ ); }; -export default ChatRoom; \ No newline at end of file +export default ChatRoom; diff --git a/tailwind.config.js b/tailwind.config.js new file mode 100644 index 00000000..f913c122 --- /dev/null +++ b/tailwind.config.js @@ -0,0 +1,13 @@ +/** @type {import('tailwindcss').Config} */ +module.exports = { + content: [], + theme: { + extend: { + colors: { + aliceblue: '#f0f8ff', + } + + }, + }, + plugins: [], +} \ No newline at end of file From d63fcd50c69f176e2af2a77e8064b3b8a284fdb4 Mon Sep 17 00:00:00 2001 From: Jisu <92006284+jsomnium@users.noreply.github.com> Date: Fri, 27 Sep 2024 21:03:30 +0900 Subject: [PATCH 04/25] =?UTF-8?q?feat:=20=ED=98=84=EC=9E=AC=20=EC=8B=9C?= =?UTF-8?q?=EA=B0=84=20=ED=91=9C=EC=8B=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 286 +++++++++++++++++++++++++++++++++++--- package.json | 12 +- public/index.html | 1 + src/assets/battery.svg | 5 + src/assets/networkImg.svg | 3 + src/assets/wifiImg.svg | 3 + src/components/navBar.tsx | 47 ++++++- tailwind.config.js | 6 +- webpack.config.js | 10 ++ 9 files changed, 340 insertions(+), 33 deletions(-) create mode 100644 src/assets/battery.svg create mode 100644 src/assets/networkImg.svg create mode 100644 src/assets/wifiImg.svg create mode 100644 webpack.config.js diff --git a/package-lock.json b/package-lock.json index 7d14648c..ac756890 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,6 +7,7 @@ "": { "name": "react-messenger-19th", "version": "0.1.0", + "license": "ISC", "dependencies": { "@testing-library/jest-dom": "^5.17.0", "@testing-library/react": "^13.4.0", @@ -25,7 +26,10 @@ }, "devDependencies": { "@types/react": "^18.3.9", - "tailwindcss": "^3.4.13" + "file-loader": "^6.2.0", + "tailwindcss": "^3.4.13", + "webpack": "^5.95.0", + "webpack-cli": "^5.1.4" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -2294,6 +2298,16 @@ "postcss-selector-parser": "^6.0.10" } }, + "node_modules/@discoveryjs/json-ext": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", + "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.0.0" + } + }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", @@ -4074,15 +4088,6 @@ "@types/json-schema": "*" } }, - "node_modules/@types/eslint-scope": { - "version": "3.7.7", - "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.7.tgz", - "integrity": "sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==", - "dependencies": { - "@types/eslint": "*", - "@types/estree": "*" - } - }, "node_modules/@types/estree": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", @@ -4688,6 +4693,53 @@ "@xtuc/long": "4.2.2" } }, + "node_modules/@webpack-cli/configtest": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-2.1.1.tgz", + "integrity": "sha512-wy0mglZpDSiSS0XHrVR+BAdId2+yxPSoJW8fsna3ZpYSlufjvxnP4YbKTCBZnNIcGN4r6ZPXV55X4mYExOfLmw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.15.0" + }, + "peerDependencies": { + "webpack": "5.x.x", + "webpack-cli": "5.x.x" + } + }, + "node_modules/@webpack-cli/info": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-2.0.2.tgz", + "integrity": "sha512-zLHQdI/Qs1UyT5UBdWNqsARasIA+AaF8t+4u2aS2nEpBQh2mWIVb8qAklq0eUENnC5mOItrIB4LiS9xMtph18A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.15.0" + }, + "peerDependencies": { + "webpack": "5.x.x", + "webpack-cli": "5.x.x" + } + }, + "node_modules/@webpack-cli/serve": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-2.0.5.tgz", + "integrity": "sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.15.0" + }, + "peerDependencies": { + "webpack": "5.x.x", + "webpack-cli": "5.x.x" + }, + "peerDependenciesMeta": { + "webpack-dev-server": { + "optional": true + } + } + }, "node_modules/@xtuc/ieee754": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", @@ -4747,10 +4799,11 @@ "node": ">=0.4.0" } }, - "node_modules/acorn-import-assertions": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", - "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", + "node_modules/acorn-import-attributes": { + "version": "1.9.5", + "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz", + "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==", + "license": "MIT", "peerDependencies": { "acorn": "^8" } @@ -5917,6 +5970,21 @@ "wrap-ansi": "^7.0.0" } }, + "node_modules/clone-deep": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", + "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.2", + "shallow-clone": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", @@ -7069,9 +7137,10 @@ } }, "node_modules/enhanced-resolve": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.16.0.tgz", - "integrity": "sha512-O+QWCviPNSSLAD9Ucn8Awv+poAkqn3T1XY5/N7kR7rQO9yfSGWkYZDwpJ+iKF7B8rxaQKWngSqACpgzeapSyoA==", + "version": "5.17.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", + "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==", + "license": "MIT", "dependencies": { "graceful-fs": "^4.2.4", "tapable": "^2.2.0" @@ -7088,6 +7157,19 @@ "url": "https://github.com/fb55/entities?sponsor=1" } }, + "node_modules/envinfo": { + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.14.0.tgz", + "integrity": "sha512-CO40UI41xDQzhLB1hWyqUKgFhs250pNcGbyGKe1l/e4FSaI/+YE4IMG76GDt0In67WLPACIITC+sOi08x4wIvg==", + "dev": true, + "license": "MIT", + "bin": { + "envinfo": "dist/cli.js" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", @@ -8155,6 +8237,16 @@ "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==" }, + "node_modules/fastest-levenshtein": { + "version": "1.0.16", + "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", + "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4.9.1" + } + }, "node_modules/fastq": { "version": "1.17.1", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", @@ -8197,6 +8289,7 @@ "version": "6.2.0", "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-6.2.0.tgz", "integrity": "sha512-qo3glqyTa61Ytg4u73GultjHGjdRyig3tG6lPtyX/jOEJvHif9uB0/OCI2Kif6ctF3caQTW2G5gym21oAsI4pw==", + "license": "MIT", "dependencies": { "loader-utils": "^2.0.0", "schema-utils": "^3.0.0" @@ -8319,6 +8412,16 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true, + "license": "BSD-3-Clause", + "bin": { + "flat": "cli.js" + } + }, "node_modules/flat-cache": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", @@ -9357,6 +9460,16 @@ "node": ">= 0.4" } }, + "node_modules/interpret": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-3.1.1.tgz", + "integrity": "sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.13.0" + } + }, "node_modules/ipaddr.js": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.1.0.tgz", @@ -9651,6 +9764,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "license": "MIT", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/is-potential-custom-element-name": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", @@ -9828,6 +9954,16 @@ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" }, + "node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/istanbul-lib-coverage": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", @@ -15020,6 +15156,19 @@ "node": ">=8.10.0" } }, + "node_modules/rechoir": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz", + "integrity": "sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve": "^1.20.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, "node_modules/recursive-readdir": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/recursive-readdir/-/recursive-readdir-2.2.3.tgz", @@ -15772,6 +15921,19 @@ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" }, + "node_modules/shallow-clone": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", + "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -17273,20 +17435,20 @@ } }, "node_modules/webpack": { - "version": "5.91.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.91.0.tgz", - "integrity": "sha512-rzVwlLeBWHJbmgTC/8TvAcu5vpJNII+MelQpylD4jNERPwpBJOE2lEcko1zJX3QJeLjTTAnQxn/OJ8bjDzVQaw==", + "version": "5.95.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.95.0.tgz", + "integrity": "sha512-2t3XstrKULz41MNMBF+cJ97TyHdyQ8HCt//pqErqDvNjU9YQBnZxIHa11VXsi7F3mb5/aO2tuDxdeTPdU7xu9Q==", + "license": "MIT", "dependencies": { - "@types/eslint-scope": "^3.7.3", "@types/estree": "^1.0.5", "@webassemblyjs/ast": "^1.12.1", "@webassemblyjs/wasm-edit": "^1.12.1", "@webassemblyjs/wasm-parser": "^1.12.1", "acorn": "^8.7.1", - "acorn-import-assertions": "^1.9.0", + "acorn-import-attributes": "^1.9.5", "browserslist": "^4.21.10", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.16.0", + "enhanced-resolve": "^5.17.1", "es-module-lexer": "^1.2.1", "eslint-scope": "5.1.1", "events": "^3.2.0", @@ -17318,6 +17480,62 @@ } } }, + "node_modules/webpack-cli": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.1.4.tgz", + "integrity": "sha512-pIDJHIEI9LR0yxHXQ+Qh95k2EvXpWzZ5l+d+jIo+RdSm9MiHfzazIxwwni/p7+x4eJZuvG1AJwgC4TNQ7NRgsg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@discoveryjs/json-ext": "^0.5.0", + "@webpack-cli/configtest": "^2.1.1", + "@webpack-cli/info": "^2.0.2", + "@webpack-cli/serve": "^2.0.5", + "colorette": "^2.0.14", + "commander": "^10.0.1", + "cross-spawn": "^7.0.3", + "envinfo": "^7.7.3", + "fastest-levenshtein": "^1.0.12", + "import-local": "^3.0.2", + "interpret": "^3.1.1", + "rechoir": "^0.8.0", + "webpack-merge": "^5.7.3" + }, + "bin": { + "webpack-cli": "bin/cli.js" + }, + "engines": { + "node": ">=14.15.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "5.x.x" + }, + "peerDependenciesMeta": { + "@webpack-cli/generators": { + "optional": true + }, + "webpack-bundle-analyzer": { + "optional": true + }, + "webpack-dev-server": { + "optional": true + } + } + }, + "node_modules/webpack-cli/node_modules/commander": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", + "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14" + } + }, "node_modules/webpack-dev-middleware": { "version": "5.3.4", "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-5.3.4.tgz", @@ -17551,6 +17769,21 @@ "node": ">=10.13.0" } }, + "node_modules/webpack-merge": { + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.10.0.tgz", + "integrity": "sha512-+4zXKdx7UnO+1jaN4l2lHVD+mFvnlZQP/6ljaJVb4SZiwIKeUnrT5l0gkT8z+n4hKpC+jpOv6O9R+gLtag7pSA==", + "dev": true, + "license": "MIT", + "dependencies": { + "clone-deep": "^4.0.1", + "flat": "^5.0.2", + "wildcard": "^2.0.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, "node_modules/webpack-sources": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", @@ -17731,6 +17964,13 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/wildcard": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.1.tgz", + "integrity": "sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==", + "dev": true, + "license": "MIT" + }, "node_modules/word-wrap": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", diff --git a/package.json b/package.json index df862a9b..d4fa6cb6 100644 --- a/package.json +++ b/package.json @@ -44,6 +44,14 @@ }, "devDependencies": { "@types/react": "^18.3.9", - "tailwindcss": "^3.4.13" - } + "file-loader": "^6.2.0", + "tailwindcss": "^3.4.13", + "webpack": "^5.95.0", + "webpack-cli": "^5.1.4" + }, + "description": "안녕하세요 🙌🏻 20기 프론트 운영진 김동혁입니다. 이번 미션에서는 드디어 투두리스트에서 벗어나 새로운 프로젝트인 **messenger** 만들기를 진행합니다.", + "main": "tailwind.config.js", + "keywords": [], + "author": "", + "license": "ISC" } diff --git a/public/index.html b/public/index.html index c2dcc3e6..d417263c 100644 --- a/public/index.html +++ b/public/index.html @@ -4,6 +4,7 @@ + React App diff --git a/src/assets/battery.svg b/src/assets/battery.svg new file mode 100644 index 00000000..01beff5d --- /dev/null +++ b/src/assets/battery.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/src/assets/networkImg.svg b/src/assets/networkImg.svg new file mode 100644 index 00000000..ddea4e75 --- /dev/null +++ b/src/assets/networkImg.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/wifiImg.svg b/src/assets/wifiImg.svg new file mode 100644 index 00000000..e6c4572a --- /dev/null +++ b/src/assets/wifiImg.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/components/navBar.tsx b/src/components/navBar.tsx index 4ea4a656..c8554f07 100644 --- a/src/components/navBar.tsx +++ b/src/components/navBar.tsx @@ -1,9 +1,46 @@ -const navBar: React.FC = () => { +import React, { useState, useEffect } from 'react'; + +const NavBar: React.FC = () => { + const [time, setTime] = useState(""); + + // 시간 업데이트 함수 + const updateTime = () => { + const currentTime = new Date(); + let hours = currentTime.getHours(); // H + const minutes = currentTime.getMinutes().toString().padStart(2, '0'); // 분 + + // 12시간 형식으로 변환 + hours = hours % 12; + hours = hours ? hours : 12; // 0시를 12시로 변환 + + const newTime = `${hours.toString().padStart(2, '0')}:${minutes}`; + setTime(newTime); // 시간 초기화 + }; + + // 1분마다 시간 업데이트 + useEffect(() => { + updateTime(); // 첫 랜더링시 호출 + const intervalId = setInterval(updateTime, 60000); // 1분마다 업데이트 + + return () => clearInterval(intervalId); + // 컴포넌트가 언마운트될 때 인터벌 제거.. 사실 자세히 모르겠음 다시 공부해보자 + }, []); + return ( -
- navBar : 시간, 와이파이 등 +
+ {/* 시간 표시 */} +
+ {time} +
+ + {/* 우측 아이콘 표시 */} +
+ Signal + WiFi + Battery +
- ); + ); }; -export default navBar; \ No newline at end of file +export default NavBar; diff --git a/tailwind.config.js b/tailwind.config.js index f913c122..eb91bc05 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,12 +1,12 @@ /** @type {import('tailwindcss').Config} */ module.exports = { - content: [], + content: [ + ], theme: { extend: { colors: { - aliceblue: '#f0f8ff', + aliceblue: '#f0f8ff', /* 색상 커스텀 가능한듯 */ } - }, }, plugins: [], diff --git a/webpack.config.js b/webpack.config.js new file mode 100644 index 00000000..87dcb34e --- /dev/null +++ b/webpack.config.js @@ -0,0 +1,10 @@ +module.exports = { + module: { + rules: [ + { + test: /\.svg$/, + use: 'file-loader', + }, + ], + }, +}; From 796ee334260eac3858e3f6256e1effc768c0bb81 Mon Sep 17 00:00:00 2001 From: Jisu <92006284+jsomnium@users.noreply.github.com> Date: Fri, 27 Sep 2024 21:57:17 +0900 Subject: [PATCH 05/25] =?UTF-8?q?feat:=20=EC=82=AC=EC=9A=A9=EC=9E=90?= =?UTF-8?q?=EC=97=90=20=EB=94=B0=EB=9D=BC=20=EB=9E=9C=EB=8D=94=EB=A7=81=20?= =?UTF-8?q?=EB=90=98=EB=8A=94=20=EA=B2=83=20=EB=B3=80=EA=B2=BD=ED=95=98?= =?UTF-8?q?=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/chatHeader.tsx | 13 ++++++ src/components/dateDivider.tsx | 18 +++++--- src/components/myMessageBox.tsx | 20 ++++++--- src/components/navBar.tsx | 6 +-- src/components/otherMessageBox.tsx | 20 ++++++--- src/data/chatData.json | 33 +++++++++----- src/pages/chatRoom.tsx | 71 ++++++++++++++++++++++++++---- tailwind.config.js | 3 ++ 8 files changed, 143 insertions(+), 41 deletions(-) create mode 100644 src/components/chatHeader.tsx diff --git a/src/components/chatHeader.tsx b/src/components/chatHeader.tsx new file mode 100644 index 00000000..df8c2426 --- /dev/null +++ b/src/components/chatHeader.tsx @@ -0,0 +1,13 @@ +const chatHeader: React.FC = () => { + return ( +
+ backArrowImg +
+ 김나나 +
+ morePointImg +
+ ); +}; + +export default chatHeader; \ No newline at end of file diff --git a/src/components/dateDivider.tsx b/src/components/dateDivider.tsx index bbb99a10..d69aeef9 100644 --- a/src/components/dateDivider.tsx +++ b/src/components/dateDivider.tsx @@ -1,9 +1,15 @@ -const dateDivider: React.FC = () => { - return ( -
- 2024.09.11 수요일 -
+// DateDivider 컴포넌트에 전달되는 props 타입 정의 +type DateDividerProps = { + date: string; // date prop을 문자열로 받을 수 있도록 설정 +}; + +// DateDivider 컴포넌트: 날짜 구분자를 표시 +const DateDivider: React.FC = ({ date }) => { + return ( +
+ {date} +
); }; -export default dateDivider; \ No newline at end of file +export default DateDivider; diff --git a/src/components/myMessageBox.tsx b/src/components/myMessageBox.tsx index b7a485ec..7160dfce 100644 --- a/src/components/myMessageBox.tsx +++ b/src/components/myMessageBox.tsx @@ -1,9 +1,17 @@ -const myMessageBox: React.FC = () => { - return ( -
- 내가 보낸 메세지 -
+// MyMessageBox 컴포넌트에 전달되는 props 타입 정의 +type MyMessageBoxProps = { + message: string; + timestamp: string; +}; + +// MyMessageBox 컴포넌트: 사용자가 보낸 메시지 표시 +const MyMessageBox: React.FC = ({ message, timestamp }) => { + return ( +
+

{message}

+ {timestamp} +
); }; -export default myMessageBox; \ No newline at end of file +export default MyMessageBox; diff --git a/src/components/navBar.tsx b/src/components/navBar.tsx index c8554f07..a4ebca64 100644 --- a/src/components/navBar.tsx +++ b/src/components/navBar.tsx @@ -35,9 +35,9 @@ const NavBar: React.FC = () => { {/* 우측 아이콘 표시 */}
- Signal - WiFi - Battery + Battery + Battery + Battery
); diff --git a/src/components/otherMessageBox.tsx b/src/components/otherMessageBox.tsx index feaa5979..3e459dc4 100644 --- a/src/components/otherMessageBox.tsx +++ b/src/components/otherMessageBox.tsx @@ -1,9 +1,17 @@ -const otherMessageBox: React.FC = () => { - return ( -
- 상대가 보낸 메세지: 프로필 사진까지 같이 옴 -
+// OtherMessageBox 컴포넌트에 전달되는 props 타입 정의 +type OtherMessageBoxProps = { + message: string; + timestamp: string; +}; + +// OtherMessageBox 컴포넌트: 상대방이 보낸 메시지 표시 +const OtherMessageBox: React.FC = ({ message, timestamp }) => { + return ( +
+

{message}

+ {timestamp} +
); }; -export default otherMessageBox; \ No newline at end of file +export default OtherMessageBox; diff --git a/src/data/chatData.json b/src/data/chatData.json index 0cfa5c26..a0ecf5bf 100644 --- a/src/data/chatData.json +++ b/src/data/chatData.json @@ -1,17 +1,28 @@ { - "users": [ - { - "user_id": "", - "name": "", - "profile_picture": "" - } - ], "messages": [ { - "message_id": "1", - "sender_id": "", - "message": "", - "timestamp": "" + "messageId": 1, + "senderId": 1, + "message": "나나야 우리 낼 모임 누구누구 온댔지?", + "timestamp": "2024.09.11 오후 9:47" + }, + { + "messageId": 2, + "senderId": 2, + "message": "나랑 너랑 미미랑 오랜지랑 루비님이랑 로로님이랑 디디랑 음 그리고 또 누구였더라", + "timestamp": "2024.09.11 오후 9:47" + }, + { + "messageId": 3, + "senderId": 2, + "message": "선우야 나 드디어 생일이다~", + "timestamp": "2024.09.12 오후 9:47" + }, + { + "messageId": 4, + "senderId": 1, + "message": "생일 축하해 ㅎㅎ", + "timestamp": "2024.09.12 오후 9:48" } ] } diff --git a/src/pages/chatRoom.tsx b/src/pages/chatRoom.tsx index 13feaeef..536903b6 100644 --- a/src/pages/chatRoom.tsx +++ b/src/pages/chatRoom.tsx @@ -1,26 +1,79 @@ -import React from 'react'; +import React, { useState, useEffect } from 'react'; import NavBar from '../components/navBar'; import DateDivider from '../components/dateDivider'; import MyMessageBox from '../components/myMessageBox'; import OtherMessageBox from '../components/otherMessageBox'; import ProfileButton from '../components/profileButton'; import PlusButton from '../components/plusButton'; +import ChatHeader from '../components/chatHeader'; +import messagesData from '../data/chatData.json'; + +// Message 타입 정의 : 타입 스크립트 쓰니까 편하네요!!! +type Message = { + messageId: number; + // 메세지 아이디를 따로 저장해두면 좋을 것 같아서 일단 넣어줬습니다! 습관 비스무리한.. + senderId: number; + // 사용자 전환 시 메세지 디자인도 변경도 변경됩니다. 이를 위해 senderId를 넣어줬습니다! + message: string; + // 메세지 내용은 string으로 저장했습니다! + timestamp: string; + // 일단 시간을 데이터로 저장하기 위해 string으로 저장했습니다! +}; const ChatRoom: React.FC = () => { + // 현재 사용자 ID 상태 (기본값: 1) + const [userId, setUserId] = useState(1); + + // 메시지 데이터 상태 (초기값: 빈 배열) + const [messages, setMessages] = useState([]); + + // 컴포넌트 첫 랜더링시 JSON 데이터를 상태에 설정함 + useEffect(() => { + setMessages(messagesData.messages); + }, []); + + // 버튼 클릭 시 사용자 ID 변경 + const toggleUserId = () => { + setUserId(userId === 1 ? 2 : 1); + }; + return (
-
- 백버튼 김나나 점 -
-
- - - - + + + {/* 채팅 메세지 메인 Body */ } +
+ {/* 메시지 리스트 순회하면서 각각 렌더링 */} + {messages.map((message) => ( +
+ {/* 날짜 구분자 (timestamp에서 날짜 부분만 추출되도록 일단 했습니다!) */} + + + {/* senderId와 userId 동일 여부에 따라 메시지 박스를 렌더링했습니다! */} + {message.senderId === userId ? ( + + ) : ( + + )} + + {/* 상대방 메시지일 때만 메시지 아래에 프로필이 렌더링 되도록 했습니다! */} + {message.senderId !== userId && } + + +
+ ))} + + {/* 임시로 유저 Id 변경 버튼을 만들었습니다! 이 기능을 다른 버튼에 넣으면 될듯합니다 */} +
+ + {/* 하단 입력 영역 */}
+
메시지 입력하기
); diff --git a/tailwind.config.js b/tailwind.config.js index eb91bc05..eade96ac 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -4,6 +4,9 @@ module.exports = { ], theme: { extend: { + fontFamily: { + sans: ['"Apple SD Gothic Neo"', 'sans-serif'], + }, colors: { aliceblue: '#f0f8ff', /* 색상 커스텀 가능한듯 */ } From fb60e8dd177031846f0f4800a0d9141e02320827 Mon Sep 17 00:00:00 2001 From: Jisu <92006284+jsomnium@users.noreply.github.com> Date: Fri, 27 Sep 2024 22:18:35 +0900 Subject: [PATCH 06/25] =?UTF-8?q?feat:=20=EB=A9=94=EC=84=B8=EC=A7=80=20?= =?UTF-8?q?=EC=A0=84=EC=86=A1=20=EA=B8=B0=EB=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/shopIcon.svg | 3 +++ src/assets/smileIcon.svg | 3 +++ src/pages/chatRoom.tsx | 46 +++++++++++++++++++++++++++++++++++++--- 3 files changed, 49 insertions(+), 3 deletions(-) create mode 100644 src/assets/shopIcon.svg create mode 100644 src/assets/smileIcon.svg diff --git a/src/assets/shopIcon.svg b/src/assets/shopIcon.svg new file mode 100644 index 00000000..54a9db8d --- /dev/null +++ b/src/assets/shopIcon.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/smileIcon.svg b/src/assets/smileIcon.svg new file mode 100644 index 00000000..24c707db --- /dev/null +++ b/src/assets/smileIcon.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/pages/chatRoom.tsx b/src/pages/chatRoom.tsx index 536903b6..bf9cf2be 100644 --- a/src/pages/chatRoom.tsx +++ b/src/pages/chatRoom.tsx @@ -37,6 +37,37 @@ const ChatRoom: React.FC = () => { setUserId(userId === 1 ? 2 : 1); }; + // 입력된 메시지 상태 (메시지 입력값 저장) + const [inputMessage, setInputMessage] = useState(""); + + // 메시지 입력 시 마다 호출됨 (input 값 변화 추적) + const handleInputChange = (e: React.ChangeEvent) => { + setInputMessage(e.target.value); + // 인풋의 value를 그대로 추적해서 inputMessage 상태에 담습니다! + }; + + // Enter 키 입력 시 메시지를 상태에 추가함 (사실 전송의 기능을 수행합니다!) + const sendMessage = (e: React.KeyboardEvent) => { + if (e.key === 'Enter' && inputMessage.trim()) { + // 현재 시간을 타임스탬프로 저장 + const newTimestamp = new Date().toLocaleString(); + + // 입력된 메세지 기반으로 새 메세지를 생성합니다! + const newMessage: Message = { + messageId: messages.length + 1, // 메시지 ID는 기존 메시지 수에 +1 + senderId: userId, // 현재 사용자 ID를 저장함 + message: inputMessage, // 입력된 메시지 내용 저장 + timestamp: newTimestamp, // 현재 시간 + }; + + // 기존 메시지에 새 메시지 추가 + setMessages([...messages, newMessage]); + + // 입력창 초기화.. 까먹을뻔 + setInputMessage(""); + } + }; + return (
@@ -60,7 +91,6 @@ const ChatRoom: React.FC = () => { {/* 상대방 메시지일 때만 메시지 아래에 프로필이 렌더링 되도록 했습니다! */} {message.senderId !== userId && } -
))} @@ -71,9 +101,19 @@ const ChatRoom: React.FC = () => {
{/* 하단 입력 영역 */} -
+
+ {/* 좌측의 추가 버튼 */} -
메시지 입력하기
+ + {/* 메시지 입력 영역 (Enter 키 입력 시 메시지 등록) */} +
); From fdc967f7b1c6a2927b1ab0272948bca2b3f34e65 Mon Sep 17 00:00:00 2001 From: Jisu <92006284+jsomnium@users.noreply.github.com> Date: Fri, 27 Sep 2024 22:36:24 +0900 Subject: [PATCH 07/25] =?UTF-8?q?feat:=20=EB=A9=94=EC=84=B8=EC=A7=80=20?= =?UTF-8?q?=EC=A0=84=EC=86=A1=20=EC=8B=9C=20=ED=95=98=EB=8B=A8=20=EC=8A=A4?= =?UTF-8?q?=ED=81=AC=EB=A1=A4=20=EC=9D=B4=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/chatRoom.tsx | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/pages/chatRoom.tsx b/src/pages/chatRoom.tsx index bf9cf2be..88c8badf 100644 --- a/src/pages/chatRoom.tsx +++ b/src/pages/chatRoom.tsx @@ -1,4 +1,4 @@ -import React, { useState, useEffect } from 'react'; +import React, { useState, useEffect, useRef } from 'react'; import NavBar from '../components/navBar'; import DateDivider from '../components/dateDivider'; import MyMessageBox from '../components/myMessageBox'; @@ -46,6 +46,19 @@ const ChatRoom: React.FC = () => { // 인풋의 value를 그대로 추적해서 inputMessage 상태에 담습니다! }; + // 스크롤을 적용을 위한 useRef. DOM 조작에는 Ref가 제일 효율적이라고 하네요! + const messageScrollRef = useRef(null); + + // 메시지 전송 시 스크롤 하단 이동 + const scrollToBottom = () => { + messageScrollRef.current?.scrollIntoView({ behavior: "smooth" }); + }; + + // 메시지 추가 시 (전송 시) 스크롤 하단 이동 함수 실행 + useEffect(() => { + scrollToBottom(); + }, [messages]); + // Enter 키 입력 시 메시지를 상태에 추가함 (사실 전송의 기능을 수행합니다!) const sendMessage = (e: React.KeyboardEvent) => { if (e.key === 'Enter' && inputMessage.trim()) { @@ -74,7 +87,7 @@ const ChatRoom: React.FC = () => { {/* 채팅 메세지 메인 Body */ } -
+
{/* 메시지 리스트 순회하면서 각각 렌더링 */} {messages.map((message) => (
@@ -98,6 +111,9 @@ const ChatRoom: React.FC = () => { + + {/* 스크롤 하단 이동을 위한 빈 태그 '타겟 요소'. 메세지 추가시 이 요소로 스크롤이 이동됨! */} +
{/* 하단 입력 영역 */} From 468dbb354f93b3cc6f4a355dbf3f6e666d83d95a Mon Sep 17 00:00:00 2001 From: Jisu <92006284+jsomnium@users.noreply.github.com> Date: Fri, 27 Sep 2024 23:28:23 +0900 Subject: [PATCH 08/25] =?UTF-8?q?feat:=20DateDivider=20=EB=9E=9C=EB=8D=94?= =?UTF-8?q?=EB=A7=81=20=EC=A1=B0=EA=B1=B4=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 날짜가 다른 경우에만 Date Divider 랜더링되도록 2. 날짜 안 나오는거 수정 --- src/pages/chatRoom.tsx | 57 +++++++++++++++++++++++++++--------------- 1 file changed, 37 insertions(+), 20 deletions(-) diff --git a/src/pages/chatRoom.tsx b/src/pages/chatRoom.tsx index 88c8badf..0619cc43 100644 --- a/src/pages/chatRoom.tsx +++ b/src/pages/chatRoom.tsx @@ -63,7 +63,8 @@ const ChatRoom: React.FC = () => { const sendMessage = (e: React.KeyboardEvent) => { if (e.key === 'Enter' && inputMessage.trim()) { // 현재 시간을 타임스탬프로 저장 - const newTimestamp = new Date().toLocaleString(); + const now = new Date(); + const newTimestamp = `${formatDate(now)}`; // 날짜와 시간 저장 // 입력된 메세지 기반으로 새 메세지를 생성합니다! const newMessage: Message = { @@ -81,6 +82,17 @@ const ChatRoom: React.FC = () => { } }; + // 이전 메시지의 날짜를 추적할 변수 (컴포넌트 외부에서 관리) + let previousDate = ""; + + // 날짜를 yyyy.MM.dd 형식으로 변환하는 함수 + const formatDate = (date: Date) => { + const year = date.getFullYear(); + const month = (date.getMonth() + 1).toString().padStart(2, '0'); // 2자리 월 + const day = date.getDate().toString().padStart(2, '0'); // 2자리 일 + return `${year}.${month}.${day}`; + }; + return (
@@ -89,28 +101,33 @@ const ChatRoom: React.FC = () => { {/* 채팅 메세지 메인 Body */ }
{/* 메시지 리스트 순회하면서 각각 렌더링 */} - {messages.map((message) => ( -
- {/* 날짜 구분자 (timestamp에서 날짜 부분만 추출되도록 일단 했습니다!) */} - - - {/* senderId와 userId 동일 여부에 따라 메시지 박스를 렌더링했습니다! */} - {message.senderId === userId ? ( - - ) : ( - - )} - - {/* 상대방 메시지일 때만 메시지 아래에 프로필이 렌더링 되도록 했습니다! */} - {message.senderId !== userId && } - -
- ))} + {messages.map((message) => { + const currentDate = message.timestamp.split(' ')[0]; // 날짜 부분만 추출 + const showDateDivider = currentDate !== previousDate; // 날짜가 다르면 DateDivider 렌더링 + previousDate = currentDate; // 이전 날짜 업데이트 + + return ( +
+ {/* 날짜 구분자 (현재 날짜와 이전 메시지 날짜가 다를 때만 렌더링) */} + {showDateDivider && } + + {/* senderId와 userId 동일 여부에 따라 메시지 박스를 렌더링했습니다! */} + {message.senderId === userId ? ( + + ) : ( + + )} + + {/* 상대방 메시지일 때만 메시지 아래에 프로필이 렌더링 되도록 했습니다! */} + {message.senderId !== userId && } +
+ ); + })} {/* 임시로 유저 Id 변경 버튼을 만들었습니다! 이 기능을 다른 버튼에 넣으면 될듯합니다 */} - + {/* 스크롤 하단 이동을 위한 빈 태그 '타겟 요소'. 메세지 추가시 이 요소로 스크롤이 이동됨! */}
From 6cbb0fabbe748aacb5bf1f240011012b8d0fa50d Mon Sep 17 00:00:00 2001 From: Jisu <92006284+jsomnium@users.noreply.github.com> Date: Fri, 27 Sep 2024 23:41:45 +0900 Subject: [PATCH 09/25] =?UTF-8?q?style:=20=EB=A9=94=EC=84=B8=EC=A7=80?= =?UTF-8?q?=EB=B0=95=EC=8A=A4=20=EC=8A=A4=ED=83=80=EC=9D=BC=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/chatHeader.tsx | 29 +++++++++++++++++++---------- src/components/myMessageBox.tsx | 17 +++++++++++------ src/components/otherMessageBox.tsx | 25 +++++++++++++++++++------ src/components/profileButton.tsx | 2 +- tailwind.config.js | 2 ++ 5 files changed, 52 insertions(+), 23 deletions(-) diff --git a/src/components/chatHeader.tsx b/src/components/chatHeader.tsx index df8c2426..457aadbe 100644 --- a/src/components/chatHeader.tsx +++ b/src/components/chatHeader.tsx @@ -1,13 +1,22 @@ -const chatHeader: React.FC = () => { +const ChatHeader: React.FC = () => { return ( -
- backArrowImg -
- 김나나 -
- morePointImg -
- ); +
+ {/* 왼쪽 뒤로가기 버튼 */} +
+ backArrowImg +
+ + {/* 중앙 이름 */} +
+ 김나나 +
+ + {/* 오른쪽 더보기 버튼 */} +
+ morePointImg +
+
+ ); }; -export default chatHeader; \ No newline at end of file +export default ChatHeader; diff --git a/src/components/myMessageBox.tsx b/src/components/myMessageBox.tsx index 7160dfce..8b94b538 100644 --- a/src/components/myMessageBox.tsx +++ b/src/components/myMessageBox.tsx @@ -6,12 +6,17 @@ type MyMessageBoxProps = { // MyMessageBox 컴포넌트: 사용자가 보낸 메시지 표시 const MyMessageBox: React.FC = ({ message, timestamp }) => { - return ( -
-

{message}

- {timestamp} -
- ); + return ( +
+ {/* 타임스탬프 */} + {timestamp} + + {/* 메시지 박스 */} +
+

{message}

+
+
+ ); }; export default MyMessageBox; diff --git a/src/components/otherMessageBox.tsx b/src/components/otherMessageBox.tsx index 3e459dc4..e05b5e70 100644 --- a/src/components/otherMessageBox.tsx +++ b/src/components/otherMessageBox.tsx @@ -6,12 +6,25 @@ type OtherMessageBoxProps = { // OtherMessageBox 컴포넌트: 상대방이 보낸 메시지 표시 const OtherMessageBox: React.FC = ({ message, timestamp }) => { - return ( -
-

{message}

- {timestamp} -
- ); + return ( +
+ {/* 프로필 아이콘 */} +
+
+ {/* 프로필 아이콘 이미지 대신 아이콘 모양 */} + + + +
+
+ + {/* 메시지 박스 */} +
+

{message}

+ {timestamp} +
+
+ ); }; export default OtherMessageBox; diff --git a/src/components/profileButton.tsx b/src/components/profileButton.tsx index 5a8bde06..c4b81e8e 100644 --- a/src/components/profileButton.tsx +++ b/src/components/profileButton.tsx @@ -1,7 +1,7 @@ const profileButton: React.FC = () => { return (
- profileButton + *
); }; diff --git a/tailwind.config.js b/tailwind.config.js index eade96ac..afadf7b9 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -9,6 +9,8 @@ module.exports = { }, colors: { aliceblue: '#f0f8ff', /* 색상 커스텀 가능한듯 */ + mainYellow: 'rgba(239, 213, 70, 1)', + paleYellow: 'rgba(255, 252, 223, 1)', } }, }, From 2b60e0e513973781ed88a5b188f567303666928a Mon Sep 17 00:00:00 2001 From: Jisu <92006284+jsomnium@users.noreply.github.com> Date: Sat, 28 Sep 2024 14:12:55 +0900 Subject: [PATCH 10/25] =?UTF-8?q?feat:=20=ED=94=84=EB=A1=9C=ED=95=84=20?= =?UTF-8?q?=ED=81=B4=EB=A6=AD=20=EC=8B=9C=20=EC=82=AC=EC=9A=A9=EC=9E=90=20?= =?UTF-8?q?=EC=A0=84=ED=99=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/defaultProfileImg.svg | 9 +++++---- src/assets/myProfileImg.svg | 5 +++++ src/components/otherMessageBox.tsx | 9 --------- src/components/profileButton.tsx | 26 ++++++++++++++++++++------ src/pages/chatRoom.tsx | 14 ++++++-------- 5 files changed, 36 insertions(+), 27 deletions(-) create mode 100644 src/assets/myProfileImg.svg diff --git a/src/assets/defaultProfileImg.svg b/src/assets/defaultProfileImg.svg index 3b072888..5d953bce 100644 --- a/src/assets/defaultProfileImg.svg +++ b/src/assets/defaultProfileImg.svg @@ -1,4 +1,5 @@ - - - - \ No newline at end of file + + + + + diff --git a/src/assets/myProfileImg.svg b/src/assets/myProfileImg.svg new file mode 100644 index 00000000..c98be5c7 --- /dev/null +++ b/src/assets/myProfileImg.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/components/otherMessageBox.tsx b/src/components/otherMessageBox.tsx index e05b5e70..4981fe6c 100644 --- a/src/components/otherMessageBox.tsx +++ b/src/components/otherMessageBox.tsx @@ -8,15 +8,6 @@ type OtherMessageBoxProps = { const OtherMessageBox: React.FC = ({ message, timestamp }) => { return (
- {/* 프로필 아이콘 */} -
-
- {/* 프로필 아이콘 이미지 대신 아이콘 모양 */} - - - -
-
{/* 메시지 박스 */}
diff --git a/src/components/profileButton.tsx b/src/components/profileButton.tsx index c4b81e8e..73d90e16 100644 --- a/src/components/profileButton.tsx +++ b/src/components/profileButton.tsx @@ -1,9 +1,23 @@ -const profileButton: React.FC = () => { - return ( -
- * -
+import React from 'react'; + +interface ProfileButtonProps { + toggleUserId: () => void; +} + +const ProfileButton: React.FC = ({ toggleUserId }) => { + return ( + ); }; -export default profileButton; \ No newline at end of file +export default ProfileButton; diff --git a/src/pages/chatRoom.tsx b/src/pages/chatRoom.tsx index 0619cc43..4420fedd 100644 --- a/src/pages/chatRoom.tsx +++ b/src/pages/chatRoom.tsx @@ -3,10 +3,10 @@ import NavBar from '../components/navBar'; import DateDivider from '../components/dateDivider'; import MyMessageBox from '../components/myMessageBox'; import OtherMessageBox from '../components/otherMessageBox'; -import ProfileButton from '../components/profileButton'; import PlusButton from '../components/plusButton'; import ChatHeader from '../components/chatHeader'; import messagesData from '../data/chatData.json'; +import ProfileButton from '../components/profileButton'; // Message 타입 정의 : 타입 스크립트 쓰니까 편하네요!!! type Message = { @@ -119,20 +119,18 @@ const ChatRoom: React.FC = () => { )} {/* 상대방 메시지일 때만 메시지 아래에 프로필이 렌더링 되도록 했습니다! */} - {message.senderId !== userId && } + {message.senderId !== userId && } +
+ ); })} - {/* 임시로 유저 Id 변경 버튼을 만들었습니다! 이 기능을 다른 버튼에 넣으면 될듯합니다 */} - - {/* 스크롤 하단 이동을 위한 빈 태그 '타겟 요소'. 메세지 추가시 이 요소로 스크롤이 이동됨! */}
+ {/* 하단 입력 영역 */}
{/* 좌측의 추가 버튼 */} @@ -152,4 +150,4 @@ const ChatRoom: React.FC = () => { ); }; -export default ChatRoom; +export default ChatRoom; \ No newline at end of file From 18f5fc3c359370dbcca2e702ccb26985d9ea5d47 Mon Sep 17 00:00:00 2001 From: Jisu <92006284+jsomnium@users.noreply.github.com> Date: Sun, 29 Sep 2024 13:49:51 +0900 Subject: [PATCH 11/25] =?UTF-8?q?style:=20=ED=8C=A8=EB=94=A9=20=EB=93=B1?= =?UTF-8?q?=20UI=20=EA=B7=9C=EA=B2=A9=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/index.html | 29 ++++++++------- src/components/chatHeader.tsx | 26 +++++++------- src/components/dateDivider.tsx | 11 ++++-- src/components/myMessageBox.tsx | 16 ++++----- src/components/navBar.tsx | 10 +++--- src/components/otherMessageBox.tsx | 6 ++-- src/pages/chatRoom.tsx | 57 +++++++++++++++--------------- tailwind.config.js | 14 ++++++-- 8 files changed, 94 insertions(+), 75 deletions(-) diff --git a/public/index.html b/public/index.html index d417263c..c5c1141f 100644 --- a/public/index.html +++ b/public/index.html @@ -1,14 +1,19 @@ - - - - - - React App - - -
- - - + + + + + + + + React App + + + +
+ + + + \ No newline at end of file diff --git a/src/components/chatHeader.tsx b/src/components/chatHeader.tsx index 457aadbe..26b0e05c 100644 --- a/src/components/chatHeader.tsx +++ b/src/components/chatHeader.tsx @@ -1,20 +1,20 @@ const ChatHeader: React.FC = () => { return ( -
- {/* 왼쪽 뒤로가기 버튼 */} -
- backArrowImg -
+
+ {/* 왼쪽 뒤로가기 버튼 */} +
+ backArrowImg +
- {/* 중앙 이름 */} -
- 김나나 -
+ {/* 중앙 이름 */} +
+ 김나나 +
- {/* 오른쪽 더보기 버튼 */} -
- morePointImg -
+ {/* 오른쪽 더보기 버튼 */} +
+ morePointImg +
); }; diff --git a/src/components/dateDivider.tsx b/src/components/dateDivider.tsx index d69aeef9..62ae5e86 100644 --- a/src/components/dateDivider.tsx +++ b/src/components/dateDivider.tsx @@ -6,8 +6,15 @@ type DateDividerProps = { // DateDivider 컴포넌트: 날짜 구분자를 표시 const DateDivider: React.FC = ({ date }) => { return ( -
- {date} +
+ {/* 왼쪽 선 */} +
+ + {/* 날짜 텍스트 */} + {date} + + {/* 오른쪽 선 */} +
); }; diff --git a/src/components/myMessageBox.tsx b/src/components/myMessageBox.tsx index 8b94b538..1b3ae400 100644 --- a/src/components/myMessageBox.tsx +++ b/src/components/myMessageBox.tsx @@ -7,14 +7,14 @@ type MyMessageBoxProps = { // MyMessageBox 컴포넌트: 사용자가 보낸 메시지 표시 const MyMessageBox: React.FC = ({ message, timestamp }) => { return ( -
- {/* 타임스탬프 */} - {timestamp} - - {/* 메시지 박스 */} -
-

{message}

-
+
+ {/* 타임스탬프 */} + {timestamp} + + {/* 메시지 박스 */} +
+

{message}

+
); }; diff --git a/src/components/navBar.tsx b/src/components/navBar.tsx index a4ebca64..837d49f8 100644 --- a/src/components/navBar.tsx +++ b/src/components/navBar.tsx @@ -27,16 +27,16 @@ const NavBar: React.FC = () => { }, []); return ( -
+
{/* 시간 표시 */} -
- {time} +
+ {time}
{/* 우측 아이콘 표시 */}
- Battery - Battery + Network + WiFi Battery
diff --git a/src/components/otherMessageBox.tsx b/src/components/otherMessageBox.tsx index 4981fe6c..ecbff555 100644 --- a/src/components/otherMessageBox.tsx +++ b/src/components/otherMessageBox.tsx @@ -10,9 +10,9 @@ const OtherMessageBox: React.FC = ({ message, timestamp })
{/* 메시지 박스 */} -
-

{message}

- {timestamp} +
+

{message}

+ {timestamp}
); diff --git a/src/pages/chatRoom.tsx b/src/pages/chatRoom.tsx index 4420fedd..9a44c9d6 100644 --- a/src/pages/chatRoom.tsx +++ b/src/pages/chatRoom.tsx @@ -99,36 +99,35 @@ const ChatRoom: React.FC = () => { {/* 채팅 메세지 메인 Body */ } -
- {/* 메시지 리스트 순회하면서 각각 렌더링 */} - {messages.map((message) => { - const currentDate = message.timestamp.split(' ')[0]; // 날짜 부분만 추출 - const showDateDivider = currentDate !== previousDate; // 날짜가 다르면 DateDivider 렌더링 - previousDate = currentDate; // 이전 날짜 업데이트 - - return ( -
- {/* 날짜 구분자 (현재 날짜와 이전 메시지 날짜가 다를 때만 렌더링) */} - {showDateDivider && } - - {/* senderId와 userId 동일 여부에 따라 메시지 박스를 렌더링했습니다! */} - {message.senderId === userId ? ( - - ) : ( - - )} - - {/* 상대방 메시지일 때만 메시지 아래에 프로필이 렌더링 되도록 했습니다! */} - {message.senderId !== userId && } - -
- - ); - })} - - {/* 스크롤 하단 이동을 위한 빈 태그 '타겟 요소'. 메세지 추가시 이 요소로 스크롤이 이동됨! */} -
+
+ {/* 메시지 리스트 순회하면서 각각 렌더링 */} + {messages.map((message) => { + const currentDate = message.timestamp.split(' ')[0]; // 날짜 부분만 추출 + const showDateDivider = currentDate !== previousDate; // 날짜가 다르면 DateDivider 렌더링 + previousDate = currentDate; // 이전 날짜 업데이트 + + return ( +
+ {/* 날짜 구분자 (현재 날짜와 이전 메시지 날짜가 다를 때만 렌더링) */} + {showDateDivider && } + + {/* senderId와 userId 동일 여부에 따라 메시지 박스를 렌더링 */} + {message.senderId === userId ? ( + + ) : ( + + )} + + {/* 상대방 메시지일 때만 메시지 아래에 프로필 렌더링 */} + {message.senderId !== userId && }
+ ); + })} + + {/* 스크롤 하단 이동을 위한 빈 태그 '타겟 요소'. */} +
+
+ {/* 하단 입력 영역 */} diff --git a/tailwind.config.js b/tailwind.config.js index afadf7b9..4bf3511d 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,18 +1,26 @@ /** @type {import('tailwindcss').Config} */ module.exports = { + mode: 'jit', content: [ + './src/**/*.{js,jsx,ts,tsx}', + './public/index.html', ], theme: { extend: { fontFamily: { - sans: ['"Apple SD Gothic Neo"', 'sans-serif'], + appleSD: ['Apple SD Gothic Neo', 'sans-serif'], }, colors: { - aliceblue: '#f0f8ff', /* 색상 커스텀 가능한듯 */ mainYellow: 'rgba(239, 213, 70, 1)', paleYellow: 'rgba(255, 252, 223, 1)', + grey50: 'rgba(249, 250, 251, 1)', + grey100: 'rgba(242, 244, 246, 1)', + grey200: 'rgba(229, 232, 235, 1)', + grey400: 'rgba(176, 184, 193, 1)', + grey800: 'rgba(51, 61, 75, 1)', + mainFont: 'rgba(51, 61, 75, 1)', } }, }, plugins: [], -} \ No newline at end of file +} From f1aa703e025104f089887455161535e16cef1c77 Mon Sep 17 00:00:00 2001 From: Jisu <92006284+jsomnium@users.noreply.github.com> Date: Sun, 29 Sep 2024 14:19:29 +0900 Subject: [PATCH 12/25] =?UTF-8?q?style:=20=EC=83=81=EC=84=B8=20=EA=B7=9C?= =?UTF-8?q?=EA=B2=A9=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/plusButtonImg.svg | 5 +++++ src/components/plusButton.tsx | 4 ++-- src/components/profileButton.tsx | 3 +-- src/pages/chatRoom.tsx | 21 ++++++++++----------- 4 files changed, 18 insertions(+), 15 deletions(-) create mode 100644 src/assets/plusButtonImg.svg diff --git a/src/assets/plusButtonImg.svg b/src/assets/plusButtonImg.svg new file mode 100644 index 00000000..5a3cd268 --- /dev/null +++ b/src/assets/plusButtonImg.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/components/plusButton.tsx b/src/components/plusButton.tsx index 06f89d15..14189f23 100644 --- a/src/components/plusButton.tsx +++ b/src/components/plusButton.tsx @@ -1,7 +1,7 @@ const PlusButton: React.FC = () => { return ( - ); }; diff --git a/src/components/profileButton.tsx b/src/components/profileButton.tsx index 73d90e16..08bb0e3d 100644 --- a/src/components/profileButton.tsx +++ b/src/components/profileButton.tsx @@ -8,13 +8,12 @@ const ProfileButton: React.FC = ({ toggleUserId }) => { return ( ); diff --git a/src/pages/chatRoom.tsx b/src/pages/chatRoom.tsx index 9a44c9d6..484b279b 100644 --- a/src/pages/chatRoom.tsx +++ b/src/pages/chatRoom.tsx @@ -120,18 +120,16 @@ const ChatRoom: React.FC = () => { {/* 상대방 메시지일 때만 메시지 아래에 프로필 렌더링 */} {message.senderId !== userId && } +
+ ); + })} + {/* 스크롤 하단 이동을 위한 빈 태그 '타겟 요소'. */} +
- ); - })} + + {/* 하단 입력 영역, 그림자가 안나타남 */} +
- {/* 스크롤 하단 이동을 위한 빈 태그 '타겟 요소'. */} -
-
- - - - {/* 하단 입력 영역 */} -
{/* 좌측의 추가 버튼 */} @@ -142,7 +140,8 @@ const ChatRoom: React.FC = () => { value={inputMessage} onChange={handleInputChange} // onChange로 입력값 변경 추적 onKeyDown={sendMessage} // onKeyPress가 사용이 안된다네요? 왜지 - className="flex-grow p-2 border rounded" + className="flex w-full px-4 h-8 rounded-3xl bg-gray-100 placeholder-gray-400 placeholder:text-xs" + // placeholder 사이즈 조정이 안됨 ㅠㅠ />
From b89b7ae5b4f5f62b83ab1d39b1b5d16d23eca6f8 Mon Sep 17 00:00:00 2001 From: Jisu <92006284+jsomnium@users.noreply.github.com> Date: Sun, 29 Sep 2024 15:02:51 +0900 Subject: [PATCH 13/25] =?UTF-8?q?feat:=20=EC=9A=94=EC=9D=BC=20=ED=91=9C?= =?UTF-8?q?=EC=8B=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/dateDivider.tsx | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/components/dateDivider.tsx b/src/components/dateDivider.tsx index 62ae5e86..6a8ebd8c 100644 --- a/src/components/dateDivider.tsx +++ b/src/components/dateDivider.tsx @@ -3,15 +3,27 @@ type DateDividerProps = { date: string; // date prop을 문자열로 받을 수 있도록 설정 }; +// 요일을 구하는 함수 +const getDayOfWeek = (dateString: string): string => { + const daysOfWeek = ['일', '월', '화', '수', '목', '금', '토']; + const date = new Date(dateString); // dateString을 Date 객체로 변환 + const dayOfWeek = date.getDay(); // 요일을 숫자로 가져옴 (0: 일요일, 1: 월요일, ... 6: 토요일) + return daysOfWeek[dayOfWeek]; // 숫자에 해당하는 요일 반환 +}; + // DateDivider 컴포넌트: 날짜 구분자를 표시 const DateDivider: React.FC = ({ date }) => { + const dayOfWeek = getDayOfWeek(date); // 요일 계산 + return (
{/* 왼쪽 선 */}
- {/* 날짜 텍스트 */} - {date} + {/* 날짜와 요일 텍스트 */} + + {date} {dayOfWeek}요일 + {/* 오른쪽 선 */}
From 5ebef57d32cf71e5b52a5e54833b2a218b48f98e Mon Sep 17 00:00:00 2001 From: Jisu <92006284+jsomnium@users.noreply.github.com> Date: Sun, 29 Sep 2024 15:45:52 +0900 Subject: [PATCH 14/25] =?UTF-8?q?style:=20=ED=85=8D=EC=8A=A4=ED=8A=B8=20?= =?UTF-8?q?=EB=84=88=EB=B9=84=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/myMessageBox.tsx | 4 ++-- src/components/otherMessageBox.tsx | 14 ++++++++++---- src/components/profileButton.tsx | 3 ++- src/pages/chatRoom.tsx | 12 ++++++++---- 4 files changed, 22 insertions(+), 11 deletions(-) diff --git a/src/components/myMessageBox.tsx b/src/components/myMessageBox.tsx index 1b3ae400..3b3e272e 100644 --- a/src/components/myMessageBox.tsx +++ b/src/components/myMessageBox.tsx @@ -9,10 +9,10 @@ const MyMessageBox: React.FC = ({ message, timestamp }) => { return (
{/* 타임스탬프 */} - {timestamp} + {timestamp} {/* 메시지 박스 */} -
+

{message}

diff --git a/src/components/otherMessageBox.tsx b/src/components/otherMessageBox.tsx index ecbff555..fd4186b0 100644 --- a/src/components/otherMessageBox.tsx +++ b/src/components/otherMessageBox.tsx @@ -7,13 +7,19 @@ type OtherMessageBoxProps = { // OtherMessageBox 컴포넌트: 상대방이 보낸 메시지 표시 const OtherMessageBox: React.FC = ({ message, timestamp }) => { return ( -
+
{/* 메시지 박스 */} -
-

{message}

- {timestamp} +
+

+ {message} +

+ + {/* 시간 표시 */} + + {timestamp} +
); }; diff --git a/src/components/profileButton.tsx b/src/components/profileButton.tsx index 08bb0e3d..9b57fdce 100644 --- a/src/components/profileButton.tsx +++ b/src/components/profileButton.tsx @@ -8,12 +8,13 @@ const ProfileButton: React.FC = ({ toggleUserId }) => { return ( ); diff --git a/src/pages/chatRoom.tsx b/src/pages/chatRoom.tsx index 484b279b..25ad7fa9 100644 --- a/src/pages/chatRoom.tsx +++ b/src/pages/chatRoom.tsx @@ -115,13 +115,17 @@ const ChatRoom: React.FC = () => { {message.senderId === userId ? ( ) : ( - - )} +
{/* 좌측에 프로필, 우측에 메시지 박스 배치 */} + {/* 상대방 메시지일 때 좌측에 프로필 렌더링 */} + - {/* 상대방 메시지일 때만 메시지 아래에 프로필 렌더링 */} - {message.senderId !== userId && } + {/* 메시지 박스 */} + +
+ )}
); + })} {/* 스크롤 하단 이동을 위한 빈 태그 '타겟 요소'. */}
From 42b05e1035dd74afc30a187a2f0d5b6e58bbca4d Mon Sep 17 00:00:00 2001 From: Jisu <92006284+jsomnium@users.noreply.github.com> Date: Sat, 2 Nov 2024 17:19:30 +0900 Subject: [PATCH 15/25] =?UTF-8?q?feat:=20=ED=95=84=EC=9A=94=ED=95=9C=20ico?= =?UTF-8?q?n=20=EC=B6=94=EA=B0=80,=20=EA=B0=84=EB=8B=A8=20UI=20=EA=B5=AC?= =?UTF-8?q?=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.tsx | 6 +++++- src/assets/angryImoIcon.svg | 3 +++ src/assets/badImoIcon.svg | 0 src/assets/chatIcon.svg | 4 ++++ src/assets/chatIcon_on.svg | 4 ++++ src/assets/chatMoreIcon.svg | 3 +++ src/assets/etcIcon.svg | 4 ++++ src/assets/friendIcon.svg | 5 +++++ src/assets/friendIcon_on.svg | 5 +++++ src/assets/glassesIcon.svg | 4 ++++ src/assets/goodImoIcon.svg | 3 +++ src/assets/happyImoIcon.svg | 3 +++ src/assets/heartImoIcon.svg | 11 +++++++++++ src/assets/openChatIcon.svg | 4 ++++ src/assets/presentIcon.svg | 4 ++++ src/assets/settingIcon.svg | 3 +++ src/components/chatRomList.tsx | 29 +++++++++++++++++++++++++++++ src/components/otherMessageBox.tsx | 2 +- src/components/viewList.tsx | 12 ++++++++++++ src/pages/chatList.tsx | 29 ++++++++++++++++++++++++++++- src/pages/friendList.tsx | 8 ++++++++ 21 files changed, 143 insertions(+), 3 deletions(-) create mode 100644 src/assets/angryImoIcon.svg create mode 100644 src/assets/badImoIcon.svg create mode 100644 src/assets/chatIcon.svg create mode 100644 src/assets/chatIcon_on.svg create mode 100644 src/assets/chatMoreIcon.svg create mode 100644 src/assets/etcIcon.svg create mode 100644 src/assets/friendIcon.svg create mode 100644 src/assets/friendIcon_on.svg create mode 100644 src/assets/glassesIcon.svg create mode 100644 src/assets/goodImoIcon.svg create mode 100644 src/assets/happyImoIcon.svg create mode 100644 src/assets/heartImoIcon.svg create mode 100644 src/assets/openChatIcon.svg create mode 100644 src/assets/presentIcon.svg create mode 100644 src/assets/settingIcon.svg create mode 100644 src/components/chatRomList.tsx create mode 100644 src/components/viewList.tsx create mode 100644 src/pages/friendList.tsx diff --git a/src/App.tsx b/src/App.tsx index d36049db..aaf02c1e 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,12 +1,16 @@ import React from 'react'; import { BrowserRouter as Router, Route, Routes } from 'react-router-dom'; import ChatRoom from '../src/pages/chatRoom'; +import ChatList from '../src/pages/chatList'; +import FriendList from './pages/friendList'; function App() { return ( - } /> + } /> + } /> + } /> {/* 기본 경로: ChatRoom */} diff --git a/src/assets/angryImoIcon.svg b/src/assets/angryImoIcon.svg new file mode 100644 index 00000000..3b692db2 --- /dev/null +++ b/src/assets/angryImoIcon.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/badImoIcon.svg b/src/assets/badImoIcon.svg new file mode 100644 index 00000000..e69de29b diff --git a/src/assets/chatIcon.svg b/src/assets/chatIcon.svg new file mode 100644 index 00000000..94863493 --- /dev/null +++ b/src/assets/chatIcon.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/assets/chatIcon_on.svg b/src/assets/chatIcon_on.svg new file mode 100644 index 00000000..fc2897e5 --- /dev/null +++ b/src/assets/chatIcon_on.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/assets/chatMoreIcon.svg b/src/assets/chatMoreIcon.svg new file mode 100644 index 00000000..81233267 --- /dev/null +++ b/src/assets/chatMoreIcon.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/etcIcon.svg b/src/assets/etcIcon.svg new file mode 100644 index 00000000..9e977292 --- /dev/null +++ b/src/assets/etcIcon.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/assets/friendIcon.svg b/src/assets/friendIcon.svg new file mode 100644 index 00000000..56d37a0e --- /dev/null +++ b/src/assets/friendIcon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/assets/friendIcon_on.svg b/src/assets/friendIcon_on.svg new file mode 100644 index 00000000..aed4633e --- /dev/null +++ b/src/assets/friendIcon_on.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/assets/glassesIcon.svg b/src/assets/glassesIcon.svg new file mode 100644 index 00000000..7153750d --- /dev/null +++ b/src/assets/glassesIcon.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/assets/goodImoIcon.svg b/src/assets/goodImoIcon.svg new file mode 100644 index 00000000..fd191122 --- /dev/null +++ b/src/assets/goodImoIcon.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/happyImoIcon.svg b/src/assets/happyImoIcon.svg new file mode 100644 index 00000000..4cd2a859 --- /dev/null +++ b/src/assets/happyImoIcon.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/heartImoIcon.svg b/src/assets/heartImoIcon.svg new file mode 100644 index 00000000..695dfbff --- /dev/null +++ b/src/assets/heartImoIcon.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/assets/openChatIcon.svg b/src/assets/openChatIcon.svg new file mode 100644 index 00000000..242d0c2a --- /dev/null +++ b/src/assets/openChatIcon.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/assets/presentIcon.svg b/src/assets/presentIcon.svg new file mode 100644 index 00000000..4adbc6cc --- /dev/null +++ b/src/assets/presentIcon.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/assets/settingIcon.svg b/src/assets/settingIcon.svg new file mode 100644 index 00000000..6805ab58 --- /dev/null +++ b/src/assets/settingIcon.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/components/chatRomList.tsx b/src/components/chatRomList.tsx new file mode 100644 index 00000000..29a37a93 --- /dev/null +++ b/src/components/chatRomList.tsx @@ -0,0 +1,29 @@ +const ChatRoomList: React.FC = () => { + return ( +
+
+ IMG +
+
+
+ 김나나 +
+
+ 생일 축하해 ㅎㅎ +
+
+ +
+
+ 9월 12일 +
+
+ 2 +
+
+ +
+ ); +}; + +export default ChatRoomList; diff --git a/src/components/otherMessageBox.tsx b/src/components/otherMessageBox.tsx index fd4186b0..66e1198e 100644 --- a/src/components/otherMessageBox.tsx +++ b/src/components/otherMessageBox.tsx @@ -11,7 +11,7 @@ const OtherMessageBox: React.FC = ({ message, timestamp }) {/* 메시지 박스 */}
-

+

{message}

diff --git a/src/components/viewList.tsx b/src/components/viewList.tsx new file mode 100644 index 00000000..64c9b49f --- /dev/null +++ b/src/components/viewList.tsx @@ -0,0 +1,12 @@ +const ViewList: React.FC = () => { + return ( +
+ Friend + ChatRoom + OpenChat + Etc +
+ ); +}; + +export default ViewList; diff --git a/src/pages/chatList.tsx b/src/pages/chatList.tsx index 693da49f..4ab70a66 100644 --- a/src/pages/chatList.tsx +++ b/src/pages/chatList.tsx @@ -1 +1,28 @@ -export {} \ No newline at end of file +import React from 'react'; +import NavBar from '../components/navBar'; +import ViewList from '../components/viewList'; +import ChatRoomList from '../components/chatRomList'; + +const ChatList:React.FC = () => { + return
+ + +
+
+ 채팅 +
+
+ search + moreChat + setting +
+
+ +
{/*채팅목록 컴포넌트*/} + +
+ + +
+} +export default ChatList; \ No newline at end of file diff --git a/src/pages/friendList.tsx b/src/pages/friendList.tsx new file mode 100644 index 00000000..696d3b10 --- /dev/null +++ b/src/pages/friendList.tsx @@ -0,0 +1,8 @@ +import React from 'react'; + +const FriendList:React.FC = () => { + return
+ d +
+} +export default FriendList; \ No newline at end of file From fef40b5aad7e4d74ee65cef9ba86a4abeb5372c3 Mon Sep 17 00:00:00 2001 From: Jisu <92006284+jsomnium@users.noreply.github.com> Date: Sat, 2 Nov 2024 20:11:23 +0900 Subject: [PATCH 16/25] =?UTF-8?q?feat:=20=EB=A1=9C=EC=BB=AC=20=EC=8A=A4?= =?UTF-8?q?=ED=86=A0=EB=A6=AC=EC=A7=80=EC=97=90=EC=84=9C=20=EB=A9=94?= =?UTF-8?q?=EC=84=B8=EC=A7=80=20=EB=B6=88=EB=9F=AC=EC=98=A4=EA=B3=A0=20?= =?UTF-8?q?=EC=A0=80=EC=9E=A5=ED=95=98=EB=8A=94=20=EA=B8=B0=EB=8A=A5=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/index.html | 2 +- src/App.tsx | 8 ++++---- src/pages/{chatList.tsx => chatListRoom.tsx} | 8 +++----- src/pages/chatRoom.tsx | 9 +++++++++ src/pages/friendList.tsx | 8 -------- src/pages/friendListRoom.tsx | 8 ++++++++ 6 files changed, 25 insertions(+), 18 deletions(-) rename src/pages/{chatList.tsx => chatListRoom.tsx} (83%) delete mode 100644 src/pages/friendList.tsx create mode 100644 src/pages/friendListRoom.tsx diff --git a/public/index.html b/public/index.html index c5c1141f..999564d1 100644 --- a/public/index.html +++ b/public/index.html @@ -11,7 +11,7 @@ React App - +
diff --git a/src/App.tsx b/src/App.tsx index aaf02c1e..3c0d9895 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,16 +1,16 @@ import React from 'react'; import { BrowserRouter as Router, Route, Routes } from 'react-router-dom'; import ChatRoom from '../src/pages/chatRoom'; -import ChatList from '../src/pages/chatList'; -import FriendList from './pages/friendList'; +import ChatListRoom from './pages/chatListRoom'; +import FriendListRoom from './pages/friendListRoom'; function App() { return ( } /> - } /> - } /> + } /> + } /> {/* 기본 경로: ChatRoom */} diff --git a/src/pages/chatList.tsx b/src/pages/chatListRoom.tsx similarity index 83% rename from src/pages/chatList.tsx rename to src/pages/chatListRoom.tsx index 4ab70a66..75f2a1fa 100644 --- a/src/pages/chatList.tsx +++ b/src/pages/chatListRoom.tsx @@ -3,7 +3,7 @@ import NavBar from '../components/navBar'; import ViewList from '../components/viewList'; import ChatRoomList from '../components/chatRomList'; -const ChatList:React.FC = () => { +const ChatListRoom:React.FC = () => { return
@@ -18,11 +18,9 @@ const ChatList:React.FC = () => {
-
{/*채팅목록 컴포넌트*/} - -
+
} -export default ChatList; \ No newline at end of file +export default ChatListRoom; \ No newline at end of file diff --git a/src/pages/chatRoom.tsx b/src/pages/chatRoom.tsx index 25ad7fa9..984087b3 100644 --- a/src/pages/chatRoom.tsx +++ b/src/pages/chatRoom.tsx @@ -59,6 +59,12 @@ const ChatRoom: React.FC = () => { scrollToBottom(); }, [messages]); + // 로컬 스토리지에 메세지 업로드 + const updateLocalStorage = (newMessage: Message) => { + localStorage.setItem('chatMessages', JSON.stringify(newMessage)); + console.log(newMessage); + } + // Enter 키 입력 시 메시지를 상태에 추가함 (사실 전송의 기능을 수행합니다!) const sendMessage = (e: React.KeyboardEvent) => { if (e.key === 'Enter' && inputMessage.trim()) { @@ -77,6 +83,9 @@ const ChatRoom: React.FC = () => { // 기존 메시지에 새 메시지 추가 setMessages([...messages, newMessage]); + // 메세지 업로드 -> 잘 동작을 안함.. 해결하기ㅠㅠ + updateLocalStorage(newMessage); + // 입력창 초기화.. 까먹을뻔 setInputMessage(""); } diff --git a/src/pages/friendList.tsx b/src/pages/friendList.tsx deleted file mode 100644 index 696d3b10..00000000 --- a/src/pages/friendList.tsx +++ /dev/null @@ -1,8 +0,0 @@ -import React from 'react'; - -const FriendList:React.FC = () => { - return
- d -
-} -export default FriendList; \ No newline at end of file diff --git a/src/pages/friendListRoom.tsx b/src/pages/friendListRoom.tsx new file mode 100644 index 00000000..401d364a --- /dev/null +++ b/src/pages/friendListRoom.tsx @@ -0,0 +1,8 @@ +import React from 'react'; + +const FriendListRoom:React.FC = () => { + return
+ d +
+} +export default FriendListRoom; \ No newline at end of file From bd87c55f6a34c2af7a610286af261c8e2e6f6f7e Mon Sep 17 00:00:00 2001 From: Jisu <92006284+jsomnium@users.noreply.github.com> Date: Sat, 2 Nov 2024 20:21:24 +0900 Subject: [PATCH 17/25] =?UTF-8?q?style:=20=EC=B1=84=ED=8C=85=EB=B0=A9=20?= =?UTF-8?q?=EB=AA=A9=EB=A1=9D=20=EC=8A=A4=ED=83=80=EC=9D=BC=20=EC=84=A4?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/chatRomList.tsx | 29 ----------------------------- src/components/chatRoomList.tsx | 24 ++++++++++++++++++++++++ src/pages/chatListRoom.tsx | 4 ++-- 3 files changed, 26 insertions(+), 31 deletions(-) delete mode 100644 src/components/chatRomList.tsx create mode 100644 src/components/chatRoomList.tsx diff --git a/src/components/chatRomList.tsx b/src/components/chatRomList.tsx deleted file mode 100644 index 29a37a93..00000000 --- a/src/components/chatRomList.tsx +++ /dev/null @@ -1,29 +0,0 @@ -const ChatRoomList: React.FC = () => { - return ( -
-
- IMG -
-
-
- 김나나 -
-
- 생일 축하해 ㅎㅎ -
-
- -
-
- 9월 12일 -
-
- 2 -
-
- -
- ); -}; - -export default ChatRoomList; diff --git a/src/components/chatRoomList.tsx b/src/components/chatRoomList.tsx new file mode 100644 index 00000000..05d300a4 --- /dev/null +++ b/src/components/chatRoomList.tsx @@ -0,0 +1,24 @@ +const ChatRoomList: React.FC = () => { + return ( +
+ {/* 프로필 이미지 */} + profile + + {/* 이름과 메시지 */} +
+
김나나
+
생일 축하해 ㅎㅎ
+
+ + {/* 날짜 */} +
+ 9월 12일 +
+
+ ); +}; + +export default ChatRoomList; diff --git a/src/pages/chatListRoom.tsx b/src/pages/chatListRoom.tsx index 75f2a1fa..d5c4adce 100644 --- a/src/pages/chatListRoom.tsx +++ b/src/pages/chatListRoom.tsx @@ -1,14 +1,14 @@ import React from 'react'; import NavBar from '../components/navBar'; import ViewList from '../components/viewList'; -import ChatRoomList from '../components/chatRomList'; +import ChatRoomList from '../components/chatRoomList'; const ChatListRoom:React.FC = () => { return
-
+
채팅
From 27990f62acc7ca14796f9297f970292a4a595b33 Mon Sep 17 00:00:00 2001 From: Jisu <92006284+jsomnium@users.noreply.github.com> Date: Sat, 2 Nov 2024 20:50:03 +0900 Subject: [PATCH 18/25] =?UTF-8?q?style:=20=EC=B1=84=ED=8C=85=EB=B0=A9=20?= =?UTF-8?q?=EB=AA=A9=EB=A1=9D=20UI=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/{viewList.tsx => bottomViewList.tsx} | 7 ++++--- src/pages/chatListRoom.tsx | 12 +++++++----- 2 files changed, 11 insertions(+), 8 deletions(-) rename src/components/{viewList.tsx => bottomViewList.tsx} (63%) diff --git a/src/components/viewList.tsx b/src/components/bottomViewList.tsx similarity index 63% rename from src/components/viewList.tsx rename to src/components/bottomViewList.tsx index 64c9b49f..e36a4093 100644 --- a/src/components/viewList.tsx +++ b/src/components/bottomViewList.tsx @@ -1,6 +1,7 @@ -const ViewList: React.FC = () => { +const BottomViewList: React.FC = () => { return ( -
+
+ {/* 상단 그림자 추가 하기*/} Friend ChatRoom OpenChat @@ -9,4 +10,4 @@ const ViewList: React.FC = () => { ); }; -export default ViewList; +export default BottomViewList; diff --git a/src/pages/chatListRoom.tsx b/src/pages/chatListRoom.tsx index d5c4adce..f72633da 100644 --- a/src/pages/chatListRoom.tsx +++ b/src/pages/chatListRoom.tsx @@ -1,14 +1,14 @@ import React from 'react'; import NavBar from '../components/navBar'; -import ViewList from '../components/viewList'; +import BottomViewList from '../components/bottomViewList'; import ChatRoomList from '../components/chatRoomList'; const ChatListRoom:React.FC = () => { - return
+ return
-
+
채팅
@@ -18,9 +18,11 @@ const ChatListRoom:React.FC = () => {
- +
+ +
- +
} export default ChatListRoom; \ No newline at end of file From 49afc606a996a1d3741ba84aa6ffed3c6b460f7d Mon Sep 17 00:00:00 2001 From: Jisu <92006284+jsomnium@users.noreply.github.com> Date: Sat, 2 Nov 2024 21:12:52 +0900 Subject: [PATCH 19/25] =?UTF-8?q?feat:=20=EC=B9=9C=EA=B5=AC=20=EB=AA=A9?= =?UTF-8?q?=EB=A1=9D=20UI=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/addFriendIcon.svg | 3 + src/assets/{presentIcon.svg => giftIcon.svg} | 0 src/assets/searchIcon.svg | 4 ++ src/pages/friendListRoom.tsx | 61 ++++++++++++++++++-- 4 files changed, 63 insertions(+), 5 deletions(-) create mode 100644 src/assets/addFriendIcon.svg rename src/assets/{presentIcon.svg => giftIcon.svg} (100%) create mode 100644 src/assets/searchIcon.svg diff --git a/src/assets/addFriendIcon.svg b/src/assets/addFriendIcon.svg new file mode 100644 index 00000000..a2b02eab --- /dev/null +++ b/src/assets/addFriendIcon.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/presentIcon.svg b/src/assets/giftIcon.svg similarity index 100% rename from src/assets/presentIcon.svg rename to src/assets/giftIcon.svg diff --git a/src/assets/searchIcon.svg b/src/assets/searchIcon.svg new file mode 100644 index 00000000..7153750d --- /dev/null +++ b/src/assets/searchIcon.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/pages/friendListRoom.tsx b/src/pages/friendListRoom.tsx index 401d364a..92a531d0 100644 --- a/src/pages/friendListRoom.tsx +++ b/src/pages/friendListRoom.tsx @@ -1,8 +1,59 @@ import React from 'react'; +import NavBar from '../components/navBar'; +import BottomViewList from '../components/bottomViewList'; -const FriendListRoom:React.FC = () => { - return
- d -
+const FriendListRoom: React.FC = () => { + return ( +
+ +
+
+

친구

+
+ Search + Add Friend + Settings +
+
+ + {/* 본인 프로필 */} +
+ My Profile + 선우 +
+ + {/* 생일인 친구 */} +
+
+ 생일인 친구 +
+
+
+ Search +

+ 김나나 +

+
+ Gift +
+
+ + {/* 친구 목록 */} +
+
+ 친구 4 +
+
+ Search +

+ 권미미 +

+
+
+
+ +
+ ); } -export default FriendListRoom; \ No newline at end of file + +export default FriendListRoom; From 06444b48f58f52e442b75ea9c74d6d4f75ba8eaa Mon Sep 17 00:00:00 2001 From: Jisu <92006284+jsomnium@users.noreply.github.com> Date: Sat, 2 Nov 2024 21:32:13 +0900 Subject: [PATCH 20/25] =?UTF-8?q?feat:=20=ED=98=84=EC=9E=AC=20=EA=B2=BD?= =?UTF-8?q?=EB=A1=9C=EC=97=90=20=EB=94=B0=EB=9D=BC=20=EC=95=84=EC=9D=B4?= =?UTF-8?q?=EC=BD=98=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.tsx | 6 +++--- src/components/bottomViewList.tsx | 34 ++++++++++++++++++++++++++++--- src/data/chatData.json | 4 ++++ 3 files changed, 38 insertions(+), 6 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 3c0d9895..f5af7d7d 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -8,10 +8,10 @@ function App() { return ( - } /> + {/* 기본 경로: FriendListRoom => 친구 목록 */} + } /> + } /> } /> - } /> - {/* 기본 경로: ChatRoom */} ); diff --git a/src/components/bottomViewList.tsx b/src/components/bottomViewList.tsx index e36a4093..66dd3ab8 100644 --- a/src/components/bottomViewList.tsx +++ b/src/components/bottomViewList.tsx @@ -1,9 +1,37 @@ +import React, { useState } from 'react'; +import { Link, useLocation } from 'react-router-dom'; + const BottomViewList: React.FC = () => { + const location = useLocation(); + const [selectedIcon, setSelectedIcon] = useState(location.pathname); + // useLocation으로 초기 경로 가져와 현재 선택된 아이콘 저장 + + const handleTabClick = (icon: string) => { + setSelectedIcon(icon); + }; + return (
- {/* 상단 그림자 추가 하기*/} - Friend - ChatRoom + handleTabClick('/')}> + Friend + + handleTabClick('/chatListRoom')}> + ChatRoom + OpenChat Etc
diff --git a/src/data/chatData.json b/src/data/chatData.json index a0ecf5bf..eb30e9e5 100644 --- a/src/data/chatData.json +++ b/src/data/chatData.json @@ -3,24 +3,28 @@ { "messageId": 1, "senderId": 1, + "senderName": "최선우", "message": "나나야 우리 낼 모임 누구누구 온댔지?", "timestamp": "2024.09.11 오후 9:47" }, { "messageId": 2, "senderId": 2, + "senderName": "최선우", "message": "나랑 너랑 미미랑 오랜지랑 루비님이랑 로로님이랑 디디랑 음 그리고 또 누구였더라", "timestamp": "2024.09.11 오후 9:47" }, { "messageId": 3, "senderId": 2, + "senderName": "최선우", "message": "선우야 나 드디어 생일이다~", "timestamp": "2024.09.12 오후 9:47" }, { "messageId": 4, "senderId": 1, + "senderName": "최선우", "message": "생일 축하해 ㅎㅎ", "timestamp": "2024.09.12 오후 9:48" } From e33c683213a134e9b23037cb8adca46ce258aa77 Mon Sep 17 00:00:00 2001 From: Jisu <92006284+jsomnium@users.noreply.github.com> Date: Sat, 2 Nov 2024 21:51:20 +0900 Subject: [PATCH 21/25] =?UTF-8?q?feat:=20=EC=9C=A0=EC=A0=80=20json=20?= =?UTF-8?q?=ED=8C=8C=EC=9D=BC=20=EA=B8=B0=EB=B0=98=20=EB=9E=9C=EB=8D=94?= =?UTF-8?q?=EB=A7=81,=20=EC=83=9D=EC=9D=BC=EC=9D=B8=20=EC=B9=9C=EA=B5=AC?= =?UTF-8?q?=20=ED=95=84=ED=84=B0=EB=A7=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/data/userData.json | 37 ++++++++++++++ src/pages/friendListRoom.tsx | 94 +++++++++++++++++++++++++----------- 2 files changed, 103 insertions(+), 28 deletions(-) create mode 100644 src/data/userData.json diff --git a/src/data/userData.json b/src/data/userData.json new file mode 100644 index 00000000..45a318ff --- /dev/null +++ b/src/data/userData.json @@ -0,0 +1,37 @@ +[ + { + "id": 1, + "name": "선우", + "birthday": "1990-11-01" + }, + { + "id": 2, + "name": "문현준", + "birthday": "1990-11-02" + }, + { + "id": 3, + "name": "이상혁", + "birthday": "1991-11-02" + }, + { + "id": 4, + "name": "최우제", + "birthday": "1990-11-03" + }, + { + "id": 4, + "name": "이민형", + "birthday": "1990-11-03" + }, + { + "id": 4, + "name": "류민석", + "birthday": "1990-11-04" + }, + { + "id": 4, + "name": "루비", + "birthday": "1990-11-04" + } +] diff --git a/src/pages/friendListRoom.tsx b/src/pages/friendListRoom.tsx index 92a531d0..1ab2ec74 100644 --- a/src/pages/friendListRoom.tsx +++ b/src/pages/friendListRoom.tsx @@ -1,8 +1,46 @@ -import React from 'react'; +import React, { useEffect, useState } from 'react'; import NavBar from '../components/navBar'; import BottomViewList from '../components/bottomViewList'; +import userData from '../data/userData.json'; // 사용자 데이터 JSON 파일 const FriendListRoom: React.FC = () => { + // 사용자 ID 상태 (기본값: 1) + const [userId] = useState(1); + + // 사용자 프로필 상태 + const [userProfile, setUserProfile] = useState<{ id: number, name: string } | null>(null); + + // 생일인 친구 목록 상태 + const [birthdayFriends, setBirthdayFriends] = useState<{ id: number, name: string }[]>([]); + + // 친구 목록 상태 + const [friends, setFriends] = useState<{ id: number, name: string }[]>([]); + + // 컴포넌트가 처음 렌더링될 때 사용자 데이터를 불러오는 useEffect + useEffect(() => { + // 사용자 데이터에서 현재 사용자 ID에 해당하는 프로필 찾기 + const profile = userData.find(user => user.id === userId); + if (profile) { + setUserProfile(profile); // 프로필 상태 업데이트 + } + + // 오늘 날짜 가져오기 + const today = new Date(); + const todayString = `${today.getMonth() + 1}-${today.getDate()}`; // MM-DD 형식으로 변환 + + // 생일인 친구 목록과 친구 목록 설정 + const birthdayFriendsList = userData.filter(friend => { + const friendBirthday = new Date(friend.birthday); + const friendBirthdayString = `${friendBirthday.getMonth() + 1}-${friendBirthday.getDate()}`; + return friendBirthdayString === todayString; // 생일이 오늘인 친구 필터링 + }); + + const friendsList = userData.filter(friend => friend.id !== userId); // 현재 사용자를 제외한 친구 목록 + + setBirthdayFriends(birthdayFriendsList); // 생일인 친구 목록 상태 업데이트 + setFriends(friendsList); // 친구 목록 상태 업데이트 + }, [userId]); // userId가 변경될 때마다 다시 실행 + return (
@@ -17,43 +55,43 @@ const FriendListRoom: React.FC = () => {
{/* 본인 프로필 */} -
- My Profile - 선우 -
+ {userProfile && ( // 사용자 프로필이 있을 경우에만 렌더링 +
+ My Profile + {userProfile.name} +
+ )} {/* 생일인 친구 */} -
-
- 생일인 친구 -
-
-
- Search -

- 김나나 -

-
- Gift + {birthdayFriends.length > 0 && ( // 생일인 친구가 있을 경우에만 렌더링 +
+
생일인 친구
+ {birthdayFriends.map(friend => ( +
+
+ Friend +

{friend.name}

+
+ Gift +
+ ))}
-
+ )} {/* 친구 목록 */}
-
- 친구 4 -
-
- Search -

- 권미미 -

-
+
친구 {friends.length}
+ {friends.map(friend => ( +
+ Friend +

{friend.name}

+
+ ))}
); -} +}; export default FriendListRoom; From b915ac0876175ac2dc77dbfa9f1056d54619f915 Mon Sep 17 00:00:00 2001 From: Jisu <92006284+jsomnium@users.noreply.github.com> Date: Sat, 2 Nov 2024 22:15:28 +0900 Subject: [PATCH 22/25] =?UTF-8?q?feat:=20=EC=B1=84=ED=8C=85=EB=B0=A9=20?= =?UTF-8?q?=EB=AA=A9=EB=A1=9D=20=EA=B5=AC=ED=98=84=20(1)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.tsx | 2 +- src/components/chatRoomList.tsx | 36 +++++++++++++++++++++++++---- src/data/chatData.json | 16 +++++++++---- src/data/userData.json | 8 +++---- src/pages/chatListRoom.tsx | 41 +++++++++++++++++++-------------- 5 files changed, 72 insertions(+), 31 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index f5af7d7d..4c707e02 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -10,7 +10,7 @@ function App() { {/* 기본 경로: FriendListRoom => 친구 목록 */} } /> - } /> + } /> } /> diff --git a/src/components/chatRoomList.tsx b/src/components/chatRoomList.tsx index 05d300a4..5536be2e 100644 --- a/src/components/chatRoomList.tsx +++ b/src/components/chatRoomList.tsx @@ -1,6 +1,32 @@ -const ChatRoomList: React.FC = () => { +import React from 'react'; +import { useNavigate } from 'react-router-dom'; +import messagesData from '../data/chatData.json'; +import userData from '../data/userData.json'; + +interface ChatRoomProps { + userId: number; +} + +const ChatRoomList: React.FC = ({ userId }) => { + const navigate = useNavigate(); + + // 해당 userId에 맞는 채팅방 데이터를 찾기 + const chatRoom = messagesData.messages.filter(message => message.senderId === userId); + + // 가장 최근 메시지 가져오기 + const latestMessage = chatRoom[chatRoom.length - 1]; // 가장 최근 메시지 + + // userId에 맞는 사용자 이름 찾기 + const user = userData.find(user => user.id === userId); + const userName = user ? user.name : `사용자 ${userId}`; // 사용자 이름이 없으면 기본 이름 사용 + + // 클릭 시 해당 사용자의 ChatRoom으로 라우팅 + const handleClick = () => { + navigate(`/chatRoom/${userId}`); + }; + return ( -
+
{/* 프로필 이미지 */} { {/* 이름과 메시지 */}
-
김나나
-
생일 축하해 ㅎㅎ
+
{userName}
+
{latestMessage ? latestMessage.message : "메시지가 없습니다."}
{/* 날짜 */}
- 9월 12일 + {latestMessage ? latestMessage.timestamp.split(' ')[0] : "날짜 없음"}
); diff --git a/src/data/chatData.json b/src/data/chatData.json index eb30e9e5..2c6d72cc 100644 --- a/src/data/chatData.json +++ b/src/data/chatData.json @@ -3,30 +3,38 @@ { "messageId": 1, "senderId": 1, - "senderName": "최선우", "message": "나나야 우리 낼 모임 누구누구 온댔지?", "timestamp": "2024.09.11 오후 9:47" }, { "messageId": 2, "senderId": 2, - "senderName": "최선우", "message": "나랑 너랑 미미랑 오랜지랑 루비님이랑 로로님이랑 디디랑 음 그리고 또 누구였더라", "timestamp": "2024.09.11 오후 9:47" }, { "messageId": 3, "senderId": 2, - "senderName": "최선우", "message": "선우야 나 드디어 생일이다~", "timestamp": "2024.09.12 오후 9:47" }, { "messageId": 4, "senderId": 1, - "senderName": "최선우", "message": "생일 축하해 ㅎㅎ", "timestamp": "2024.09.12 오후 9:48" + }, + { + "messageId": 5, + "senderId": 1, + "message": "대상혁!", + "timestamp": "2024.11.02 오후 9:20" + }, + { + "messageId": 5, + "senderId": 3, + "message": "감사합니다", + "timestamp": "2024.11.02 오후 9:25" } ] } diff --git a/src/data/userData.json b/src/data/userData.json index 45a318ff..58701087 100644 --- a/src/data/userData.json +++ b/src/data/userData.json @@ -20,18 +20,18 @@ "birthday": "1990-11-03" }, { - "id": 4, + "id": 5, "name": "이민형", "birthday": "1990-11-03" }, { - "id": 4, + "id": 6, "name": "류민석", "birthday": "1990-11-04" }, { - "id": 4, - "name": "루비", + "id": 7, + "name": "김나나", "birthday": "1990-11-04" } ] diff --git a/src/pages/chatListRoom.tsx b/src/pages/chatListRoom.tsx index f72633da..6a9f46c1 100644 --- a/src/pages/chatListRoom.tsx +++ b/src/pages/chatListRoom.tsx @@ -3,26 +3,33 @@ import NavBar from '../components/navBar'; import BottomViewList from '../components/bottomViewList'; import ChatRoomList from '../components/chatRoomList'; -const ChatListRoom:React.FC = () => { - return
- +const ChatListRoom: React.FC = () => { + const userIds = [1, 3]; // 목록에 랜더링할 사용자 ID -
-
- 채팅 + return ( +
+ + +
+
+ 채팅 +
+
+ search + moreChat + setting +
-
- search - moreChat - setting + +
+ {userIds.map(userId => ( + + ))}
-
-
- +
+ ); +}; - -
-} -export default ChatListRoom; \ No newline at end of file +export default ChatListRoom; From 6e2f87c810c5a3e96df7a1921367b834c9ac8934 Mon Sep 17 00:00:00 2001 From: Jisu <92006284+jsomnium@users.noreply.github.com> Date: Sat, 2 Nov 2024 22:47:42 +0900 Subject: [PATCH 23/25] =?UTF-8?q?feat:=20=EC=B1=84=ED=8C=85=EB=B0=A9=20?= =?UTF-8?q?=EB=AA=A9=EB=A1=9D=20=EA=B5=AC=ED=98=84=20(2)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/data/chatData.json | 12 ------------ src/pages/chatListRoom.tsx | 2 +- src/pages/chatRoom.tsx | 21 +++++++++++++-------- 3 files changed, 14 insertions(+), 21 deletions(-) diff --git a/src/data/chatData.json b/src/data/chatData.json index 2c6d72cc..a0ecf5bf 100644 --- a/src/data/chatData.json +++ b/src/data/chatData.json @@ -23,18 +23,6 @@ "senderId": 1, "message": "생일 축하해 ㅎㅎ", "timestamp": "2024.09.12 오후 9:48" - }, - { - "messageId": 5, - "senderId": 1, - "message": "대상혁!", - "timestamp": "2024.11.02 오후 9:20" - }, - { - "messageId": 5, - "senderId": 3, - "message": "감사합니다", - "timestamp": "2024.11.02 오후 9:25" } ] } diff --git a/src/pages/chatListRoom.tsx b/src/pages/chatListRoom.tsx index 6a9f46c1..3659828d 100644 --- a/src/pages/chatListRoom.tsx +++ b/src/pages/chatListRoom.tsx @@ -4,7 +4,7 @@ import BottomViewList from '../components/bottomViewList'; import ChatRoomList from '../components/chatRoomList'; const ChatListRoom: React.FC = () => { - const userIds = [1, 3]; // 목록에 랜더링할 사용자 ID + const userIds = [1]; // 목록에 랜더링할 사용자 ID return (
diff --git a/src/pages/chatRoom.tsx b/src/pages/chatRoom.tsx index 984087b3..c0784b47 100644 --- a/src/pages/chatRoom.tsx +++ b/src/pages/chatRoom.tsx @@ -29,7 +29,12 @@ const ChatRoom: React.FC = () => { // 컴포넌트 첫 랜더링시 JSON 데이터를 상태에 설정함 useEffect(() => { - setMessages(messagesData.messages); + const storedMessages = localStorage.getItem('ChatData'); + if (storedMessages) { + setMessages(JSON.parse(storedMessages)); + } else { + setMessages(messagesData.messages); // JSON에서 초기 데이터 설정 + } }, []); // 버튼 클릭 시 사용자 ID 변경 @@ -60,10 +65,9 @@ const ChatRoom: React.FC = () => { }, [messages]); // 로컬 스토리지에 메세지 업로드 - const updateLocalStorage = (newMessage: Message) => { - localStorage.setItem('chatMessages', JSON.stringify(newMessage)); - console.log(newMessage); - } + const updateLocalStorage = (newMessages: Message[]) => { + localStorage.setItem('ChatData', JSON.stringify(newMessages)); + }; // Enter 키 입력 시 메시지를 상태에 추가함 (사실 전송의 기능을 수행합니다!) const sendMessage = (e: React.KeyboardEvent) => { @@ -81,10 +85,11 @@ const ChatRoom: React.FC = () => { }; // 기존 메시지에 새 메시지 추가 - setMessages([...messages, newMessage]); + const updatedMessages = [...messages, newMessage]; + setMessages(updatedMessages); // 메세지 업로드 -> 잘 동작을 안함.. 해결하기ㅠㅠ - updateLocalStorage(newMessage); + updateLocalStorage(updatedMessages); // 입력창 초기화.. 까먹을뻔 setInputMessage(""); @@ -161,4 +166,4 @@ const ChatRoom: React.FC = () => { ); }; -export default ChatRoom; \ No newline at end of file +export default ChatRoom; From 9411d139d844ddf181be502635431563fad15aa4 Mon Sep 17 00:00:00 2001 From: Jisu <92006284+jsomnium@users.noreply.github.com> Date: Sat, 2 Nov 2024 22:53:25 +0900 Subject: [PATCH 24/25] =?UTF-8?q?feat:=20=EB=92=A4=EB=A1=9C=EA=B0=80?= =?UTF-8?q?=EA=B8=B0=20=EB=9D=BC=EC=9A=B0=ED=8C=85=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/chatHeader.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/components/chatHeader.tsx b/src/components/chatHeader.tsx index 26b0e05c..bdb605c0 100644 --- a/src/components/chatHeader.tsx +++ b/src/components/chatHeader.tsx @@ -1,8 +1,17 @@ +import React from 'react'; +import { useNavigate } from 'react-router-dom'; + const ChatHeader: React.FC = () => { + const navigate = useNavigate(); + + const handleBackClick = () => { + navigate('/chatListRoom'); // chatListRoom 경로로 이동 + }; + return (
{/* 왼쪽 뒤로가기 버튼 */} -
+
backArrowImg
From 868b96fa89ff9218572c5d174e052ed3518ba93b Mon Sep 17 00:00:00 2001 From: Jisu <92006284+jsomnium@users.noreply.github.com> Date: Sun, 3 Nov 2024 13:42:44 +0900 Subject: [PATCH 25/25] =?UTF-8?q?style:=20=EC=B9=9C=EA=B5=AC=20=EB=AA=A9?= =?UTF-8?q?=EB=A1=9D=20=EB=94=94=EC=9E=90=EC=9D=B8=20=EC=A0=95=ED=99=95?= =?UTF-8?q?=ED=95=98=EA=B2=8C=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/htmlStyle.css | 1 + src/components/otherMessageBox.tsx | 2 +- src/pages/friendListRoom.tsx | 6 +++--- tailwind.config.js | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/public/htmlStyle.css b/public/htmlStyle.css index ac27156a..06ece866 100644 --- a/public/htmlStyle.css +++ b/public/htmlStyle.css @@ -7,6 +7,7 @@ body { display: flex; justify-content: center; align-items: center; + font-family: 'AppleSDGothicNeo', sans-serif; } #root { diff --git a/src/components/otherMessageBox.tsx b/src/components/otherMessageBox.tsx index 66e1198e..3a95a10f 100644 --- a/src/components/otherMessageBox.tsx +++ b/src/components/otherMessageBox.tsx @@ -11,7 +11,7 @@ const OtherMessageBox: React.FC = ({ message, timestamp }) {/* 메시지 박스 */}
-

+

{message}

diff --git a/src/pages/friendListRoom.tsx b/src/pages/friendListRoom.tsx index 1ab2ec74..74a8fd98 100644 --- a/src/pages/friendListRoom.tsx +++ b/src/pages/friendListRoom.tsx @@ -64,8 +64,8 @@ const FriendListRoom: React.FC = () => { {/* 생일인 친구 */} {birthdayFriends.length > 0 && ( // 생일인 친구가 있을 경우에만 렌더링 -
-
생일인 친구
+
+
생일인 친구
{birthdayFriends.map(friend => (
@@ -79,7 +79,7 @@ const FriendListRoom: React.FC = () => { )} {/* 친구 목록 */} -
+
친구 {friends.length}
{friends.map(friend => (
diff --git a/tailwind.config.js b/tailwind.config.js index 4bf3511d..d8e66d95 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -8,7 +8,7 @@ module.exports = { theme: { extend: { fontFamily: { - appleSD: ['Apple SD Gothic Neo', 'sans-serif'], + appleSD: ['AppleSDGothicNeo', 'sans-serif'], }, colors: { mainYellow: 'rgba(239, 213, 70, 1)',