?bpv4rSLpsM$I=XOxxzTIdtB3#L|2Ey_Z>
z-l)vZH7&A>&mlcxiA|t%i4u~iD^&uF;(kN(Zn6=hO74xLUHUvjZ5>jp{4g+?3d&~pkN*jJ$IgHw)j
z5JqoTy7(ciZ!epjxtp_Hoxc2Zo+7%6ph?P9A=`@xtp&LCTd>PBlK_;-e
z(h)fmDv?Qglq7xe92W{b$%ROn5L6-In4@4UCK7BMkv!~v9r~@OL*FIacHp}X>Fc1e
zKyt7K21+I++oWt)=>6z7Sl#?PYo8
z*`C(S)SphXwbgDou$LtoHHKD$!?Kth9ShmeeMDv$iIj<)v{~(+3g)ko0~IoZ?0QCq
zi76v0oG%9VnB%)%F3%+qC2S8*v}zNN?^~RmJhga3l)Naq=yv$zjuH3DuKmN;W-ip8
z`|E=BPI1uQZWI(~I-Qz6AvvwI$3U)_hu+gm*M^bgHE`R!Rhb|7Xu5m@8>+LL=QBqY
zn7;{jc*ezsG5x+d+NkoEJSRHph5R8^lhCNI3~Y;wHUp!tkKR)>@{kXw)k0&j@$JqN
z_7S$?;Z40ju8td@XNQ;O*fx7fY{~b_ALm+XaD?g6Zd?z<+P_WV^hI`4=9q
VQ629fZnOXZ002ovPDHLkV1j)Bm^c6c
literal 0
HcmV?d00001
diff --git a/src/assets/emoji.svg b/src/assets/emoji.svg
new file mode 100644
index 00000000..0160d484
--- /dev/null
+++ b/src/assets/emoji.svg
@@ -0,0 +1,3 @@
+
+
+
diff --git a/src/assets/heart.png b/src/assets/heart.png
new file mode 100644
index 0000000000000000000000000000000000000000..967002953e1a277b01deadd1b161ad92ca8cbffa
GIT binary patch
literal 1493
zcmV;`1uFW9P){bM6C
zBeRmo$T9<=+C)%-5EWC>U6s_`o!6b2d)|HL-n--Irfz>k=km?DkMDlJ?{&@{fd6|O
zf)!pDbkULO8!*(se)n3>N#jKyY#T3Kc!6Y`Wi&~rYGQ=0>HRX0-BWqTZUS>;qyBz0
zJTck(6eP&YPR5x<4RK9XAJ>8I_Jr9!0hSI71D%BK`@QDGXH8GGO-U}e4cv|#x@mwN
z9fb1dr!@OD|1~d{m(PH;gI51{*wUKHdOK4Ow>+MGb}~&)y9vOdp!&*C+j$z;zDp-~
z(JYw)%MRB;Ct+*5lkyJamW-d2dhT|hDc9x#ImV_0WU&V2k557Mn~Pr!uIR1@mVxfAnv#L4nR>re_yq?`;9+k0L6UtY2U($RS`H0B=SXQXT0#
z#c{n7A8jB#@J{R5=lZqakUc^Ee_41lw~q
zG#iEOCkMh**}52F8$1S}N7^-@91Sv~6Mmpv*BGzB9q9|7rzyrvBx)nT#F2#nTQ6HT
z70)yVc=1f5whB{*x*GMQtI>=A;fSK^^1v0NbT8rhoGkHnCuwWrAcTMu)(Ioh4FDBK
z25~ed2H7U1QLq|+lm#gTqGmzz4BU|`(nrp&tw~RP&jtgKSZv7!C?P>fg)a=v8U=d|
z+ff@7u(L+bqx+#wtS=>sKpRYewaFZLaOUBaBHUsmHQzCxfn*Z2KqK~LtwZmuL1P7L
zpc};=;WIq9>C!rMNJ|ufX=4g_m4R^OPKdJ&v-&!J=9>Q`DjcIxkut&zMi4^4f-q+k
z#ffJcEoOrNt7r8!Mr9qfHbjL1*Yexhz3Y4GAUhZ}uLS{P7Gj1LtG>KDKs;YQbhMS)
z!xqO3HH`^V&jMDKj(&5M*$SF*l!6jiG
zMSmesV%wu9I}Z*6+3u{mdSii?4h4dR`LFMHu~E|yK^<7Xj_%cD00my|DV6EEcoo7G
zyZ6xe;nvQXIj?!om_%z^iYBppBNe+dKz*~Zza)Iw?r+h0Hc(RmTw?jN1sTkr+qdyh
zqh04}(DqW#`Gx5RPh+wlOAsd=n}f*QW$$eP!xqPOS4KjBkzC{hyvR$7=bn4}m#gg#
zizxEekRQi)uFBD-&7-|$lAyS~Q74Xp#K5Rd3TI|G4Dynn*Ogc2o_}|1W6Flr=t?><
zt>=m#6lLkHA}=x~YPb+txFEF_*vcYWoC=FBDv%HIP!Q!e#*V9W{}Tk@8WA;)eK)V!
zG>W8GH+yODsQoO^df^2^3(|)HS$XeLcFg)0Pj>~^vg6(e)T>IbPcSNDlv_B;X_{fJA5U&
z0ImGZx^prwfgF}}M_)$E)e-c@N{7z37$B+uf)(fY38x(jL0-|LO2zo>u2%Y0_
z*GK&VZ;$j222SM{ObH(oIQE-mW}NWWY+WW0bc&C`?D?I`VFw&j{VfxC1E$}U*v!l<
zR?jckle1KF1rAn>RqJ>^=d+$B>-t*jhyUwF3Rf+n;ovxmpeb!#z
zdVFi03;arp{T$`jM@O`3x;ecfSCz#goIj234}R+13j*!iwoM)0{9&JFxWi@(-=bx(
zLDkU}z6*R=3hH>5SJ>-LgT2^&&D7*C0-C(D|DwW@@~%{u@=vvQO)I*Ffy^MFwgHk9
zgaz2gfzq4cr`{^LU-9RPrNZvzJ5QeY$w0+>JFaXl*thAItR7&?cQ9lxCCxm&(MXg;
zi-&O$XajJL0jD08?ujE4mFe6~g`G1`A$I4-fu`?R@{c7KmmW~pZ%d>1?{uOk04dTA
z_iCaUg820G;yq}8<|W7@54z`0ng8v&Zf?(y0!{Dk+}g9O`h>FKZy7A5RH&
zY#}0%03{OcIR!EMKKMJ2R?beF|600h_UZ2dy?J9t)6mN50b}seLG*6{Oajrh?*OTb
zQYVr~5|Jc6iA!KphhQH*FjcK;L)|yjW|7>C*2PWk%|=IV9opB>y&`2qiC=3;R8mc%
zQIhn_*tkM~f}R17#V2W5hV;_TzG|hqlN4{pLc;f5Gm;zVncS=QuSz3pl0loqiJo(3
z&tUAp$7n53l~OJluf+lj*15Ad`s#7CwFwvs)yk_ULIjZ-)Y+-QD+l@?dEn4oHHv6W
z+r+Su)mo#PxE1m;_MS@xPu_JHXC~$`^T`bUdOfjE%5Sp%@U3s4{AC3v-|fQHyNLRp
zh{dI-7(*(ja>ClT;Qr!veb{i`s`p`Au}W{I#9g|u8ok&^XLLMMVmk~2vFzD+eO`WQb}#Y@l3z;{EZ9e7l4
z&qwKFY!5;*NJl8g96Lak!uNRtv#JPgTXCrh?YnluyBI$>8ndHcn5~V4Cck7Ft+>XzUQPR;|io
z;37tK^kB`qLB|2M@J5K0$2QKDgT-!=m7^80^F?W}jV`_nR5HHJjIwN~=hj
z8Z=W!I8;~?PT&PJwFsOhMtwd2jm3im^6&Mxd*c-Sg+JvB>-Z=Px1QN7gW&%LjXER6
zTJ@B|!afQwahd{t*pQB_`<{3!0K2cN#d~4-D5%BH2e}~7LUa@NpsDg%dNpU_GDE>i
znl_!`IZw|njh@$aK;L|&{!PB`Nn?ckH}xTz6J+5BD@`L-LU`w002ovPDHLk
FV1i+mNag?l
literal 0
HcmV?d00001
diff --git a/src/assets/status.svg b/src/assets/status.svg
new file mode 100644
index 00000000..24698928
--- /dev/null
+++ b/src/assets/status.svg
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/assets/surprise.png b/src/assets/surprise.png
new file mode 100644
index 0000000000000000000000000000000000000000..6afb42711e1416ae51ef9fe8608addf195708977
GIT binary patch
literal 1626
zcmV-g2BrClP)s;V}TI^PY
zclGxfh2*5mSiW3euyCl$Fr5X7dcMd=VV)jCt2*;Nneodw
z#Pe*IU18t0ufA~ZwusJco_=RrM{ZrbReM(NoY{cZ1wg6?&?f_u1Vjb
zoZtA@=}g;(X=~4(ylJBJ+s#WRwOMb*?s;G~o3@gnrk5le>BJytkrY>c5oramj{_qg
zOXuW~;rwXrYi(;UeTnco*C!g?)bUKmjLcU3q2)<*K22|85kZ`!)n1Pz6^TbrH{65v
zzkdgLd-ATsd*Z#lJ(#`-NDxWPxPnN(Ds&?9B!VP(1c%5j
z?1Oc9&xJz4nA`qJX&jMeu;$bctv8!%y3sU?^wOlHg~x{SiXe^18!ZaI42?4pK7Ag-
zBh*hta!N~AAzxTag6mNY_`vGE+U|~X+hQ~BPohTU!XntgGnc-Mp#!JU&@5q^^iGx{
z6ydr#9Nl>wal=9?Nd#^=LM6DEK7OHR$?WN$Y~7bF1Rl+tJiNfHF&cuLIC;9X9^9S_
zhJnq8acOu07k|2lrE96YMN~|TVaHp8IK6)ib**)HVZ+1FeL8c=Lx%_F@miy{C6%LO
zV_QI!)QgYucmg`78@ny^Fb7lauSdnz(ECIi-82e|f>lEI<83J0
z8m2zjh+0z>L#PMO4))3>gXrq->(dQ%j+tDD$((aY?tuBxttjbCYItf{J6xj^aaF#S
z8-yfSQlhsvfthn=BIeSWL-1q-LG|H5a9>q?)4W+@x>24W6LIxUKv31_oQOCJ;WN6C
zMBF1IIt!bjTHTTb6&~YWK&oUzJsAuQNw$0i`jwhYsjd8Ix8n=rqD%EJJck5Gn^Wo(
zp-xfz4u7ok8}bVvgO;9V+nFL^D|bcQ%GBA$8F0;4Y{u;D%3V+)TmKUM^oq2
zu^fIpm<`(Mk@-!Ses6s^@`B!#(IoOADNnxR!l?*~sByM`W4{OjQ4*8(+65tPIuMRU
z)5MBmt%r?Ew?8vf#E#ELkiA?$daQu$AO4E*F(>rQt$HQ{5>EP#C1B+_Dm?K$su4d^
zYCl>i>8DCXP68gJQ-~@|H6aUdXkQu~%?wTT8d@4Pv^N1q_GiM}C>clfPla@;k;z86
zC{QRFql2Ph=U+st-aG0Q-MUT1v?ogiPSxv^XVkb(E-F_+V~^1^`g`)nX#B;31{YyV
zkgT-x#N|QRC}v#W_RTleY#DZNMGc`bp$(`nWidm7MIUyVL)i3jvnQymC(zy9K=IZf
zX)-9-q~0^T7SyRElLfa+6b&DhQa}PLCyt6@Y~Y&dt=5q>i7s6i`|8?^&Pk1NBx?-B
zO$Oc2f=ND-GcbJKMl7!3zG-oEB;BATgs+k=QK=9~)@{6+Iig!7FWF
z^MzGpCtpu=S!MZdA|)5sG{z85>WI-CQ=Vy&hMKLMn0)FLRY2tlUya4RM6&9kjqWMN
z{^L_#T_^fsI_1H9C5Cgz%P)<7X+n$7|x<%y>n(w1e<6$gBIIbVORZM
zxFJ#1yWuUU%m0#mfHN_lB6v4Vo)-0
Date: Thu, 26 Sep 2024 10:34:10 +0900
Subject: [PATCH 02/74] build : tailwind
---
package-lock.json | 284 ++++++++++++++++++++++++++++++++++++++++++++-
package.json | 5 +
tailwind.config.js | 32 +++++
tsconfig.json | 10 +-
4 files changed, 319 insertions(+), 12 deletions(-)
create mode 100644 tailwind.config.js
diff --git a/package-lock.json b/package-lock.json
index c27bbe4e..61a8e918 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -8,6 +8,7 @@
"name": "react-messenger-19th",
"version": "0.1.0",
"dependencies": {
+ "@craco/craco": "^7.1.0",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
@@ -20,6 +21,10 @@
"react-scripts": "5.0.1",
"typescript": "^4.9.5",
"web-vitals": "^2.1.4"
+ },
+ "devDependencies": {
+ "craco-alias": "^3.0.1",
+ "tailwindcss": "^3.4.13"
}
},
"node_modules/@aashutoshrathi/word-wrap": {
@@ -2018,6 +2023,52 @@
"resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz",
"integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw=="
},
+ "node_modules/@craco/craco": {
+ "version": "7.1.0",
+ "resolved": "https://registry.npmjs.org/@craco/craco/-/craco-7.1.0.tgz",
+ "integrity": "sha512-oRAcPIKYrfPXp9rSzlsDNeOaVtDiKhoyqSXUoqiK24jCkHr4T8m/a2f74yXIzCbIheoUWDOIfWZyRgFgT+cpqA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "autoprefixer": "^10.4.12",
+ "cosmiconfig": "^7.0.1",
+ "cosmiconfig-typescript-loader": "^1.0.0",
+ "cross-spawn": "^7.0.3",
+ "lodash": "^4.17.21",
+ "semver": "^7.3.7",
+ "webpack-merge": "^5.8.0"
+ },
+ "bin": {
+ "craco": "dist/bin/craco.js"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "peerDependencies": {
+ "react-scripts": "^5.0.0"
+ }
+ },
+ "node_modules/@cspotcode/source-map-support": {
+ "version": "0.8.1",
+ "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz",
+ "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==",
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/trace-mapping": "0.3.9"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": {
+ "version": "0.3.9",
+ "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz",
+ "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/resolve-uri": "^3.0.3",
+ "@jridgewell/sourcemap-codec": "^1.4.10"
+ }
+ },
"node_modules/@csstools/normalize.css": {
"version": "12.1.1",
"resolved": "https://registry.npmjs.org/@csstools/normalize.css/-/normalize.css-12.1.1.tgz",
@@ -3974,6 +4025,30 @@
"node": ">=10.13.0"
}
},
+ "node_modules/@tsconfig/node10": {
+ "version": "1.0.11",
+ "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz",
+ "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==",
+ "license": "MIT"
+ },
+ "node_modules/@tsconfig/node12": {
+ "version": "1.0.11",
+ "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz",
+ "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==",
+ "license": "MIT"
+ },
+ "node_modules/@tsconfig/node14": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz",
+ "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==",
+ "license": "MIT"
+ },
+ "node_modules/@tsconfig/node16": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz",
+ "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==",
+ "license": "MIT"
+ },
"node_modules/@types/aria-query": {
"version": "5.0.4",
"resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.4.tgz",
@@ -5904,6 +5979,20 @@
"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==",
+ "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",
@@ -6144,6 +6233,39 @@
"node": ">=10"
}
},
+ "node_modules/cosmiconfig-typescript-loader": {
+ "version": "1.0.9",
+ "resolved": "https://registry.npmjs.org/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-1.0.9.tgz",
+ "integrity": "sha512-tRuMRhxN4m1Y8hP9SNYfz7jRwt8lZdWxdjg/ohg5esKmsndJIn4yT96oJVcf5x0eA11taXl+sIp+ielu529k6g==",
+ "license": "MIT",
+ "dependencies": {
+ "cosmiconfig": "^7",
+ "ts-node": "^10.7.0"
+ },
+ "engines": {
+ "node": ">=12",
+ "npm": ">=6"
+ },
+ "peerDependencies": {
+ "@types/node": "*",
+ "cosmiconfig": ">=7",
+ "typescript": ">=3"
+ }
+ },
+ "node_modules/craco-alias": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/craco-alias/-/craco-alias-3.0.1.tgz",
+ "integrity": "sha512-N+Qaf/Gr/f3o5ZH2TQjMu5NhR9PnT1ZYsfejpNvZPpB0ujdrhsSr4Ct6GVjnV5ostCVquhTKJpIVBKyL9qDQYA==",
+ "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/create-require": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz",
+ "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==",
+ "license": "MIT"
+ },
"node_modules/cross-spawn": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
@@ -6836,6 +6958,15 @@
"resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz",
"integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw=="
},
+ "node_modules/diff": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
+ "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==",
+ "license": "BSD-3-Clause",
+ "engines": {
+ "node": ">=0.3.1"
+ }
+ },
"node_modules/diff-sequences": {
"version": "27.5.1",
"resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-27.5.1.tgz",
@@ -8304,6 +8435,15 @@
"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==",
+ "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",
@@ -9636,6 +9776,18 @@
"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==",
+ "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",
@@ -9813,6 +9965,15 @@
"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==",
+ "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",
@@ -12302,6 +12463,12 @@
"semver": "bin/semver.js"
}
},
+ "node_modules/make-error": {
+ "version": "1.3.6",
+ "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
+ "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==",
+ "license": "ISC"
+ },
"node_modules/makeerror": {
"version": "1.0.12",
"resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz",
@@ -15719,6 +15886,18 @@
"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==",
+ "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",
@@ -16491,9 +16670,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",
@@ -16503,7 +16683,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",
@@ -16762,6 +16942,67 @@
"resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz",
"integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA=="
},
+ "node_modules/ts-node": {
+ "version": "10.9.2",
+ "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz",
+ "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@cspotcode/source-map-support": "^0.8.0",
+ "@tsconfig/node10": "^1.0.7",
+ "@tsconfig/node12": "^1.0.7",
+ "@tsconfig/node14": "^1.0.0",
+ "@tsconfig/node16": "^1.0.2",
+ "acorn": "^8.4.1",
+ "acorn-walk": "^8.1.1",
+ "arg": "^4.1.0",
+ "create-require": "^1.1.0",
+ "diff": "^4.0.1",
+ "make-error": "^1.1.1",
+ "v8-compile-cache-lib": "^3.0.1",
+ "yn": "3.1.1"
+ },
+ "bin": {
+ "ts-node": "dist/bin.js",
+ "ts-node-cwd": "dist/bin-cwd.js",
+ "ts-node-esm": "dist/bin-esm.js",
+ "ts-node-script": "dist/bin-script.js",
+ "ts-node-transpile-only": "dist/bin-transpile.js",
+ "ts-script": "dist/bin-script-deprecated.js"
+ },
+ "peerDependencies": {
+ "@swc/core": ">=1.2.50",
+ "@swc/wasm": ">=1.2.50",
+ "@types/node": "*",
+ "typescript": ">=2.7"
+ },
+ "peerDependenciesMeta": {
+ "@swc/core": {
+ "optional": true
+ },
+ "@swc/wasm": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/ts-node/node_modules/acorn-walk": {
+ "version": "8.3.4",
+ "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz",
+ "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==",
+ "license": "MIT",
+ "dependencies": {
+ "acorn": "^8.11.0"
+ },
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/ts-node/node_modules/arg": {
+ "version": "4.1.3",
+ "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz",
+ "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==",
+ "license": "MIT"
+ },
"node_modules/tsconfig-paths": {
"version": "3.15.0",
"resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz",
@@ -17129,6 +17370,12 @@
"uuid": "dist/bin/uuid"
}
},
+ "node_modules/v8-compile-cache-lib": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz",
+ "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==",
+ "license": "MIT"
+ },
"node_modules/v8-to-istanbul": {
"version": "8.1.1",
"resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-8.1.1.tgz",
@@ -17495,6 +17742,20 @@
"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==",
+ "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",
@@ -17675,6 +17936,12 @@
"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==",
+ "license": "MIT"
+ },
"node_modules/word-wrap": {
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz",
@@ -18164,6 +18431,15 @@
"node": ">=10"
}
},
+ "node_modules/yn": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz",
+ "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
"node_modules/yocto-queue": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
diff --git a/package.json b/package.json
index ea335d36..544211c1 100644
--- a/package.json
+++ b/package.json
@@ -3,6 +3,7 @@
"version": "0.1.0",
"private": true,
"dependencies": {
+ "@craco/craco": "^7.1.0",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
@@ -39,5 +40,9 @@
"last 1 firefox version",
"last 1 safari version"
]
+ },
+ "devDependencies": {
+ "craco-alias": "^3.0.1",
+ "tailwindcss": "^3.4.13"
}
}
diff --git a/tailwind.config.js b/tailwind.config.js
new file mode 100644
index 00000000..34ef6a02
--- /dev/null
+++ b/tailwind.config.js
@@ -0,0 +1,32 @@
+// tailwind.config.js
+module.exports = {
+ content: ['./src/**/*.{js,jsx,ts,tsx}'],
+ theme: {
+ extend: {
+ colors: {
+ primary: '#5B5FC7',
+ secondary: '#FBDED8',
+ accent: '#D6E3E9',
+ pink: {
+ light: '#E6CED0',
+ dark: '#53151A',
+ },
+ gray: {
+ 100: '#DFDFDF',
+ 500: '#919191',
+ 700: '#676767',
+ },
+ },
+ fontSize: {
+ heading: '24px',
+ body: '14px',
+ caption: '12px',
+ title: '18px',
+ subtitle: '16px',
+ largeHeading: '22px',
+ },
+ },
+ },
+ variants: {},
+ plugins: [],
+};
diff --git a/tsconfig.json b/tsconfig.json
index a273b0cf..e32cdbe0 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -1,11 +1,7 @@
{
"compilerOptions": {
"target": "es5",
- "lib": [
- "dom",
- "dom.iterable",
- "esnext"
- ],
+ "lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
@@ -20,7 +16,5 @@
"noEmit": true,
"jsx": "react-jsx"
},
- "include": [
- "src"
- ]
+ "include": ["src", "src/custom.d.ts"]
}
From df164afa67cc6d1ca883b8c78a058593f37faeca Mon Sep 17 00:00:00 2001
From: heewon lee <84234411+hiwon-lee@users.noreply.github.com>
Date: Thu, 26 Sep 2024 10:35:45 +0900
Subject: [PATCH 03/74] =?UTF-8?q?docs(chat)=20:=20=EB=AC=B8=EC=84=9C=20?=
=?UTF-8?q?=EC=83=9D=EC=84=B1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/Chat/Chat.tsx | 14 ++++++++++++++
src/pages/Chat/ChatForm.tsx | 6 ++++++
src/pages/Chat/ChatMain.tsx | 6 ++++++
3 files changed, 26 insertions(+)
create mode 100644 src/pages/Chat/Chat.tsx
create mode 100644 src/pages/Chat/ChatForm.tsx
create mode 100644 src/pages/Chat/ChatMain.tsx
diff --git a/src/pages/Chat/Chat.tsx b/src/pages/Chat/Chat.tsx
new file mode 100644
index 00000000..9303ac49
--- /dev/null
+++ b/src/pages/Chat/Chat.tsx
@@ -0,0 +1,14 @@
+import Profile from '../../components/Profile';
+import ChatHeader from './ChatHeader';
+import ChatMain from './ChatMain';
+import ChatForm from './ChatForm';
+
+export default function Chat() {
+ return (
+
+
+
+
+
+ );
+}
diff --git a/src/pages/Chat/ChatForm.tsx b/src/pages/Chat/ChatForm.tsx
new file mode 100644
index 00000000..3d000353
--- /dev/null
+++ b/src/pages/Chat/ChatForm.tsx
@@ -0,0 +1,6 @@
+import Profile from '../../components/Profile';
+import ChatHeader from './ChatHeader';
+
+export default function ChatForm() {
+ return charform
;
+}
diff --git a/src/pages/Chat/ChatMain.tsx b/src/pages/Chat/ChatMain.tsx
new file mode 100644
index 00000000..3b97ebef
--- /dev/null
+++ b/src/pages/Chat/ChatMain.tsx
@@ -0,0 +1,6 @@
+import Profile from '../../components/Profile';
+import ChatHeader from './ChatHeader';
+
+export default function ChatMain() {
+ return chatmain
;
+}
From adebfd0b56ed22b5c13981b862b95f67652c71af Mon Sep 17 00:00:00 2001
From: heewon lee <84234411+hiwon-lee@users.noreply.github.com>
Date: Thu, 26 Sep 2024 10:36:15 +0900
Subject: [PATCH 04/74] =?UTF-8?q?docs=20:=20=EC=9D=B4=EB=AF=B8=EC=A7=80?=
=?UTF-8?q?=EC=A0=91=EA=B7=BC=EA=B0=80=EB=8A=A5=EC=84=A4=EC=A0=95=ED=8C=8C?=
=?UTF-8?q?=EC=9D=BC=EC=9D=BC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/custom.d.ts | 9 +++++++++
1 file changed, 9 insertions(+)
create mode 100644 src/custom.d.ts
diff --git a/src/custom.d.ts b/src/custom.d.ts
new file mode 100644
index 00000000..976cf508
--- /dev/null
+++ b/src/custom.d.ts
@@ -0,0 +1,9 @@
+declare module '*.svg' {
+ const content: any;
+ export default content;
+}
+
+declare module '*.png' {
+ const content: any;
+ export default content;
+}
From b5cec87f7a52c04cfc0770bf72810ba8595f8279 Mon Sep 17 00:00:00 2001
From: heewon lee <84234411+hiwon-lee@users.noreply.github.com>
Date: Thu, 26 Sep 2024 10:36:55 +0900
Subject: [PATCH 05/74] feat : initial chat main
---
src/App.css | 41 +++++------------------------------------
src/App.tsx | 13 ++++++++++---
src/index.css | 4 ++++
src/index.tsx | 8 ++++----
4 files changed, 23 insertions(+), 43 deletions(-)
diff --git a/src/App.css b/src/App.css
index 74b5e053..986cd5a4 100644
--- a/src/App.css
+++ b/src/App.css
@@ -1,38 +1,7 @@
.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);
- }
+ width: 375px;
+ height: 812px;
+ margin: 1.25rem;
+ box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
+ margin: 0 auto;
}
diff --git a/src/App.tsx b/src/App.tsx
index 5381007b..67b85c86 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -1,8 +1,15 @@
+import Chat from './pages/Chat/Chat';
+import './App.css';
+import StatusBar from './components/common/StatusBar';
+
function App() {
return (
-
-
20기 프론트엔드 파이팅!!! 디자인과 사이좋게 지내요~~~
-
+ <>
+
+
+
+
+ >
);
}
diff --git a/src/index.css b/src/index.css
index ec2585e8..17df0e7e 100644
--- a/src/index.css
+++ b/src/index.css
@@ -1,3 +1,7 @@
+@tailwind base;
+@tailwind components;
+@tailwind utilities;
+
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
diff --git a/src/index.tsx b/src/index.tsx
index d10be77d..1fd12b70 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -4,10 +4,10 @@ import './index.css';
import App from './App';
const root = ReactDOM.createRoot(
- document.getElementById('root') as HTMLElement
+ document.getElementById('root') as HTMLElement
);
root.render(
-
-
-
+
+
+
);
From 97c14015e5d8a6d57d9e2c994c0e1b0ace8f62f0 Mon Sep 17 00:00:00 2001
From: heewon lee <84234411+hiwon-lee@users.noreply.github.com>
Date: Thu, 26 Sep 2024 10:37:48 +0900
Subject: [PATCH 06/74] feat : component
---
src/components/Clock.tsx | 31 +++++++++++++++++++++++++++++++
src/components/Profile.tsx | 11 +++++++++++
2 files changed, 42 insertions(+)
create mode 100644 src/components/Clock.tsx
create mode 100644 src/components/Profile.tsx
diff --git a/src/components/Clock.tsx b/src/components/Clock.tsx
new file mode 100644
index 00000000..ca93eeb0
--- /dev/null
+++ b/src/components/Clock.tsx
@@ -0,0 +1,31 @@
+import { useRef, useEffect } from 'react';
+
+// Clock : 상단 바 시간
+
+export default function Clock() {
+ const timeRef = useRef(null); // 일단 any써뒀는데, 아닌 것 같음
+
+ useEffect(() => {
+ const updateClock = () => {
+ if (timeRef.current) {
+ const hour = new Date().getHours();
+ const minute = new Date().getMinutes();
+
+ // 00:00 format
+ const formattedTime = `${String(hour).padStart(2, '0')}:${String(
+ minute
+ ).padStart(2, '0')}`;
+ timeRef.current.textContent = formattedTime;
+ }
+ };
+
+ // 초기에 시계 세팅
+ updateClock();
+
+ const id = setInterval(updateClock, 60000); // 1분에 한 번 씩 => 오차 있을 듯
+
+ return () => clearInterval(id);
+ }, []);
+
+ return
;
+}
diff --git a/src/components/Profile.tsx b/src/components/Profile.tsx
new file mode 100644
index 00000000..8e0781d8
--- /dev/null
+++ b/src/components/Profile.tsx
@@ -0,0 +1,11 @@
+export default function Profile() {
+ return (
+
+ 박
+
+ );
+}
From 3463c6ee214bc5670e55d1fabb987c3646dfadc9 Mon Sep 17 00:00:00 2001
From: heewon lee <84234411+hiwon-lee@users.noreply.github.com>
Date: Thu, 26 Sep 2024 13:14:44 +0900
Subject: [PATCH 07/74] =?UTF-8?q?docs=20:=20redux=20=EB=AA=A8=EB=93=88=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
---
package-lock.json | 95 +++++++++++++++++++++++++++++++++++++++++++++++
package.json | 2 +
2 files changed, 97 insertions(+)
diff --git a/package-lock.json b/package-lock.json
index 61a8e918..e60af30c 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -9,6 +9,7 @@
"version": "0.1.0",
"dependencies": {
"@craco/craco": "^7.1.0",
+ "@reduxjs/toolkit": "^2.2.7",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
@@ -18,6 +19,7 @@
"@types/react-dom": "^18.2.22",
"react": "^18.2.0",
"react-dom": "^18.2.0",
+ "react-redux": "^9.1.2",
"react-scripts": "5.0.1",
"typescript": "^4.9.5",
"web-vitals": "^2.1.4"
@@ -3389,6 +3391,40 @@
}
}
},
+ "node_modules/@reduxjs/toolkit": {
+ "version": "2.2.7",
+ "resolved": "https://registry.npmjs.org/@reduxjs/toolkit/-/toolkit-2.2.7.tgz",
+ "integrity": "sha512-faI3cZbSdFb8yv9dhDTmGwclW0vk0z5o1cia+kf7gCbaCwHI5e+7tP57mJUv22pNcNbeA62GSrPpfrUfdXcQ6g==",
+ "license": "MIT",
+ "dependencies": {
+ "immer": "^10.0.3",
+ "redux": "^5.0.1",
+ "redux-thunk": "^3.1.0",
+ "reselect": "^5.1.0"
+ },
+ "peerDependencies": {
+ "react": "^16.9.0 || ^17.0.0 || ^18",
+ "react-redux": "^7.2.1 || ^8.1.3 || ^9.0.0"
+ },
+ "peerDependenciesMeta": {
+ "react": {
+ "optional": true
+ },
+ "react-redux": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@reduxjs/toolkit/node_modules/immer": {
+ "version": "10.1.1",
+ "resolved": "https://registry.npmjs.org/immer/-/immer-10.1.1.tgz",
+ "integrity": "sha512-s2MPrmjovJcoMaHtx6K11Ra7oD05NT97w1IC5zpMkT6Atjr7H8LjaDd81iIxUYpMKSRRNMJE703M1Fhr/TctHw==",
+ "license": "MIT",
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/immer"
+ }
+ },
"node_modules/@rollup/plugin-babel": {
"version": "5.3.1",
"resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz",
@@ -4378,6 +4414,12 @@
"resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz",
"integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw=="
},
+ "node_modules/@types/use-sync-external-store": {
+ "version": "0.0.3",
+ "resolved": "https://registry.npmjs.org/@types/use-sync-external-store/-/use-sync-external-store-0.0.3.tgz",
+ "integrity": "sha512-EwmlvuaxPNej9+T4v5AuBPJa2x2UOJVdjCtDHgcDqitUeOtjnJKJ+apYjVcAoBEMjKW1VVFGZLUb5+qqa09XFA==",
+ "license": "MIT"
+ },
"node_modules/@types/ws": {
"version": "8.5.10",
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.10.tgz",
@@ -15023,6 +15065,29 @@
"resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",
"integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w=="
},
+ "node_modules/react-redux": {
+ "version": "9.1.2",
+ "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-9.1.2.tgz",
+ "integrity": "sha512-0OA4dhM1W48l3uzmv6B7TXPCGmokUU4p1M44DGN2/D9a1FjVPukVjER1PcPX97jIg6aUeLq1XJo1IpfbgULn0w==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/use-sync-external-store": "^0.0.3",
+ "use-sync-external-store": "^1.0.0"
+ },
+ "peerDependencies": {
+ "@types/react": "^18.2.25",
+ "react": "^18.0",
+ "redux": "^5.0.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "redux": {
+ "optional": true
+ }
+ }
+ },
"node_modules/react-refresh": {
"version": "0.11.0",
"resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.11.0.tgz",
@@ -15158,6 +15223,21 @@
"node": ">=8"
}
},
+ "node_modules/redux": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/redux/-/redux-5.0.1.tgz",
+ "integrity": "sha512-M9/ELqF6fy8FwmkpnF0S3YKOqMyoWJ4+CS5Efg2ct3oY9daQvd/Pc71FpGZsVsbl3Cpb+IIcjBDUnnyBdQbq4w==",
+ "license": "MIT"
+ },
+ "node_modules/redux-thunk": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/redux-thunk/-/redux-thunk-3.1.0.tgz",
+ "integrity": "sha512-NW2r5T6ksUKXCabzhL9z+h206HQw/NJkcLm1GPImRQ8IzfXwRGqjVhKJGauHirT0DAuyy6hjdnMZaRoAcy0Klw==",
+ "license": "MIT",
+ "peerDependencies": {
+ "redux": "^5.0.0"
+ }
+ },
"node_modules/reflect.getprototypeof": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.6.tgz",
@@ -15305,6 +15385,12 @@
"resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
"integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ=="
},
+ "node_modules/reselect": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/reselect/-/reselect-5.1.1.tgz",
+ "integrity": "sha512-K/BG6eIky/SBpzfHZv/dd+9JBFiS4SWV7FIujVyJRux6e45+73RaUHXLmIR1f7WOMaQ0U1km6qwklRQxpJJY0w==",
+ "license": "MIT"
+ },
"node_modules/resolve": {
"version": "1.22.8",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz",
@@ -17330,6 +17416,15 @@
"requires-port": "^1.0.0"
}
},
+ "node_modules/use-sync-external-store": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.2.tgz",
+ "integrity": "sha512-PElTlVMwpblvbNqQ82d2n6RjStvdSoNe9FG28kNfz3WiXilJm4DdNkEzRhCZuIDwY8U08WVihhGR5iRqAwfDiw==",
+ "license": "MIT",
+ "peerDependencies": {
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0"
+ }
+ },
"node_modules/util-deprecate": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
diff --git a/package.json b/package.json
index 544211c1..ee233509 100644
--- a/package.json
+++ b/package.json
@@ -4,6 +4,7 @@
"private": true,
"dependencies": {
"@craco/craco": "^7.1.0",
+ "@reduxjs/toolkit": "^2.2.7",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
@@ -13,6 +14,7 @@
"@types/react-dom": "^18.2.22",
"react": "^18.2.0",
"react-dom": "^18.2.0",
+ "react-redux": "^9.1.2",
"react-scripts": "5.0.1",
"typescript": "^4.9.5",
"web-vitals": "^2.1.4"
From 822b6877830eb964cbabb62844114c0420e5fa70 Mon Sep 17 00:00:00 2001
From: heewon lee <84234411+hiwon-lee@users.noreply.github.com>
Date: Thu, 26 Sep 2024 13:15:54 +0900
Subject: [PATCH 08/74] =?UTF-8?q?feat=20:=20initial=20redux=20=EB=AA=A8?=
=?UTF-8?q?=EB=93=88=20=EC=B6=94=EA=B0=80?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/Chat/ChatHeader.tsx | 33 ++++++++++++++++++++
src/redux/store.ts | 13 ++++++++
src/redux/userSlice.ts | 57 +++++++++++++++++++++++++++++++++++
3 files changed, 103 insertions(+)
create mode 100644 src/pages/Chat/ChatHeader.tsx
create mode 100644 src/redux/store.ts
create mode 100644 src/redux/userSlice.ts
diff --git a/src/pages/Chat/ChatHeader.tsx b/src/pages/Chat/ChatHeader.tsx
new file mode 100644
index 00000000..0b288df6
--- /dev/null
+++ b/src/pages/Chat/ChatHeader.tsx
@@ -0,0 +1,33 @@
+import type { RootState } from '../../redux/store';
+import { useSelector, useDispatch } from 'react-redux';
+import { setUser } from '../../redux/userSlice';
+
+import prevButton from '../../assets/prevButton.png';
+import Profile from '../../components/Profile';
+
+interface ChatInfoInterface {
+ user: string;
+ recentTime: string;
+}
+export default function ChatHeader() {
+ const userName = useSelector((state: RootState) => state.user.name);
+ const recentTime = '화요일 오후 2시';
+ const dispatch = useDispatch();
+
+ // TODO : 여기에다가 이미지 주소 추가하고 아닌 경우 '박'이라고 일단은 두기로
+
+ return (
+
+
+
+
+
{userName}
+
{recentTime}
+
+
+ );
+}
diff --git a/src/redux/store.ts b/src/redux/store.ts
new file mode 100644
index 00000000..293bf4e3
--- /dev/null
+++ b/src/redux/store.ts
@@ -0,0 +1,13 @@
+import { configureStore } from '@reduxjs/toolkit';
+import userReducer from './userSlice';
+
+export const store = configureStore({
+ reducer: {
+ user: userReducer,
+ },
+});
+
+// Infer the `RootState` and `AppDispatch` types from the store itself
+export type RootState = ReturnType;
+// Inferred type: {posts: PostsState, comments: CommentsState, users: UsersState}
+export type AppDispatch = typeof store.dispatch;
diff --git a/src/redux/userSlice.ts b/src/redux/userSlice.ts
new file mode 100644
index 00000000..9055abcb
--- /dev/null
+++ b/src/redux/userSlice.ts
@@ -0,0 +1,57 @@
+// import { createSlice } from '@reduxjs/toolkit';
+
+// const initialState = {
+// _id: '',
+// name: '',
+// profile_img: '',
+// };
+
+// export const userSlice = createSlice({
+// name: 'user',
+// initialState,
+// reducers: {
+// setUser: (state, action) => {
+// state._id = action.payload._id;
+// state.name = action.payload.name;
+// state.profile_img = action.payload.profile_img;
+// },
+// },
+// });
+
+// // Action creators are generated for each case reducer function
+// export const { setUser, setToken, logout, setOnlineUser, setSocketConnection } =
+// userSlice.actions;
+
+// export default userSlice.reducer;
+
+import { createSlice } from '@reduxjs/toolkit';
+import type { PayloadAction } from '@reduxjs/toolkit';
+
+export interface UserState {
+ _id: string;
+ name: string;
+ profileImg: string | null;
+}
+
+const initialState: UserState = {
+ _id: 'abc',
+ name: '박재원',
+ profileImg: null,
+};
+
+export const counterSlice = createSlice({
+ name: 'user',
+ initialState,
+ reducers: {
+ setUser: (state, action) => {
+ state._id = action.payload._id;
+ state.name = action.payload.name;
+ state.profileImg = action.payload.profileImg;
+ },
+ },
+});
+
+// Action creators are generated for each case reducer function
+export const { setUser } = counterSlice.actions;
+
+export default counterSlice.reducer;
From 5ff3f4dcdd26ec4b1d690aacab1ebb54680f83e8 Mon Sep 17 00:00:00 2001
From: heewon lee <84234411+hiwon-lee@users.noreply.github.com>
Date: Thu, 26 Sep 2024 13:16:23 +0900
Subject: [PATCH 09/74] =?UTF-8?q?chore=20:=20redux=20=EB=B0=98=EC=98=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/index.tsx | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/index.tsx b/src/index.tsx
index 1fd12b70..d83ec3b4 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -3,11 +3,14 @@ import ReactDOM from 'react-dom/client';
import './index.css';
import App from './App';
+import { store } from './redux/store';
+import { Provider } from 'react-redux';
+
const root = ReactDOM.createRoot(
document.getElementById('root') as HTMLElement
);
root.render(
-
+
-
+
);
From 196b332666e5609aa73e63e01a00d0f50b568c46 Mon Sep 17 00:00:00 2001
From: heewon lee <84234411+hiwon-lee@users.noreply.github.com>
Date: Thu, 26 Sep 2024 13:30:48 +0900
Subject: [PATCH 10/74] =?UTF-8?q?feat=20:=20add=20=EC=83=81=EB=8B=A8=20?=
=?UTF-8?q?=EB=B0=94?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/common/StatusBar.tsx | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
create mode 100644 src/components/common/StatusBar.tsx
diff --git a/src/components/common/StatusBar.tsx b/src/components/common/StatusBar.tsx
new file mode 100644
index 00000000..adceb2d2
--- /dev/null
+++ b/src/components/common/StatusBar.tsx
@@ -0,0 +1,16 @@
+import React from 'react';
+
+import Clock from '../Clock';
+import statusIcon from '../../assets/status.svg';
+
+export default function StatusBar() {
+ return (
+
+
+
+
+ );
+}
From d81dff182b0a99b49e6e8116b9b49ecd50bc5034 Mon Sep 17 00:00:00 2001
From: heewon lee <84234411+hiwon-lee@users.noreply.github.com>
Date: Thu, 26 Sep 2024 13:32:01 +0900
Subject: [PATCH 11/74] =?UTF-8?q?feat=20:=20=EC=BB=B4=ED=8D=BC=EB=84=8C?=
=?UTF-8?q?=ED=8A=B8=20=EC=B4=88=EA=B8=B0=ED=99=94?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/Button.tsx | 18 +++++++++
src/components/ChattingBox.tsx | 17 +++++++++
src/components/Form.tsx | 64 ++++++++++++++++++++++++++++++++
src/components/common/Header.tsx | 3 ++
4 files changed, 102 insertions(+)
create mode 100644 src/components/Button.tsx
create mode 100644 src/components/ChattingBox.tsx
create mode 100644 src/components/Form.tsx
create mode 100644 src/components/common/Header.tsx
diff --git a/src/components/Button.tsx b/src/components/Button.tsx
new file mode 100644
index 00000000..1497e17f
--- /dev/null
+++ b/src/components/Button.tsx
@@ -0,0 +1,18 @@
+interface ButtonProps {
+ children: string;
+ type: 'submit' | 'reset' | 'button' | undefined;
+ onClick: () => void;
+}
+
+const Button = ({ children, type, onClick }: ButtonProps) => {
+ return (
+
+ {children}
+
+ );
+};
+
+export default Button;
diff --git a/src/components/ChattingBox.tsx b/src/components/ChattingBox.tsx
new file mode 100644
index 00000000..950203ed
--- /dev/null
+++ b/src/components/ChattingBox.tsx
@@ -0,0 +1,17 @@
+import React from 'react';
+
+type GreetingsProps = {
+ name: string;
+ time: string;
+ content: string;
+};
+
+const Greetings = ({ name, time, content }: GreetingsProps) => (
+ Hello, {name}
+);
+
+Greetings.defaultProps = {
+ mark: '!',
+};
+
+export default Greetings;
diff --git a/src/components/Form.tsx b/src/components/Form.tsx
new file mode 100644
index 00000000..b8445b65
--- /dev/null
+++ b/src/components/Form.tsx
@@ -0,0 +1,64 @@
+import React from 'react';
+
+type FormProps = {
+ name: string;
+ mark: string;
+};
+
+const Form = ({ name, mark }: FormProps) => (
+
+
+
+
+ From the blog
+
+
+ Learn how to grow your business with our expert advice.
+
+
+
+
+
+
+
+
+ Illo sint voluptas. Error voluptates culpa eligendi. Hic vel totam
+ vitae illo. Non aliquid explicabo necessitatibus unde. Sed
+ exercitationem placeat consectetur nulla deserunt vel. Iusto
+ corrupti dicta.
+
+
+
+
+
+
+
+);
+
+Form.defaultProps = {
+ mark: '!',
+};
+
+export default Form;
diff --git a/src/components/common/Header.tsx b/src/components/common/Header.tsx
new file mode 100644
index 00000000..4d58efc9
--- /dev/null
+++ b/src/components/common/Header.tsx
@@ -0,0 +1,3 @@
+export default function Header() {
+ return header
;
+}
From 8d7307b9923ff378231e1ca808f3872a51d0656f Mon Sep 17 00:00:00 2001
From: heewon lee <84234411+hiwon-lee@users.noreply.github.com>
Date: Thu, 26 Sep 2024 13:32:26 +0900
Subject: [PATCH 12/74] =?UTF-8?q?feat=20:=20chat=20=ED=8E=98=EC=9D=B4?=
=?UTF-8?q?=EC=A7=80=20=EC=B4=88=EA=B8=B0=ED=99=94?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/contexts/ChattingContext.tsx | 18 ++++++++++++++++++
src/pages/Chat/Chat.tsx | 1 -
src/pages/Chat/ChatForm.tsx | 29 +++++++++++++++++++++++++++--
3 files changed, 45 insertions(+), 3 deletions(-)
create mode 100644 src/contexts/ChattingContext.tsx
diff --git a/src/contexts/ChattingContext.tsx b/src/contexts/ChattingContext.tsx
new file mode 100644
index 00000000..381aa538
--- /dev/null
+++ b/src/contexts/ChattingContext.tsx
@@ -0,0 +1,18 @@
+import React from 'react';
+
+type GreetingsProps = {
+ name: string;
+ mark: string;
+};
+
+const Greetings = ({ name, mark }: GreetingsProps) => (
+
+ Hello, {name} {mark}
+
+);
+
+Greetings.defaultProps = {
+ mark: '!',
+};
+
+export default Greetings;
diff --git a/src/pages/Chat/Chat.tsx b/src/pages/Chat/Chat.tsx
index 9303ac49..abba71a7 100644
--- a/src/pages/Chat/Chat.tsx
+++ b/src/pages/Chat/Chat.tsx
@@ -1,4 +1,3 @@
-import Profile from '../../components/Profile';
import ChatHeader from './ChatHeader';
import ChatMain from './ChatMain';
import ChatForm from './ChatForm';
diff --git a/src/pages/Chat/ChatForm.tsx b/src/pages/Chat/ChatForm.tsx
index 3d000353..aacc4ca6 100644
--- a/src/pages/Chat/ChatForm.tsx
+++ b/src/pages/Chat/ChatForm.tsx
@@ -1,6 +1,31 @@
+import { useState } from 'react';
import Profile from '../../components/Profile';
import ChatHeader from './ChatHeader';
+import Button from '../../components/Button';
-export default function ChatForm() {
- return charform
;
+export default function ToDoList() {
+ const [value, setValue] = useState('');
+ const onChange = (event: React.FormEvent) => {
+ const {
+ currentTarget: { value },
+ } = event;
+ setValue(value);
+ };
+ const onSubmit = (event: React.FormEvent) => {
+ event.preventDefault();
+ console.log(value);
+ };
+
+ return (
+
+
+
+ );
}
From cb614053fa0ec1b1b191cfa6dee7677778c83a9c Mon Sep 17 00:00:00 2001
From: heewon lee <84234411+hiwon-lee@users.noreply.github.com>
Date: Thu, 26 Sep 2024 18:38:44 +0900
Subject: [PATCH 13/74] feat(chat) : form
---
src/components/Button.tsx | 16 +++++--
src/components/Form.tsx | 91 ++++++++++++++++---------------------
src/pages/Chat/ChatForm.tsx | 49 ++++++++++----------
3 files changed, 77 insertions(+), 79 deletions(-)
diff --git a/src/components/Button.tsx b/src/components/Button.tsx
index 1497e17f..7f943765 100644
--- a/src/components/Button.tsx
+++ b/src/components/Button.tsx
@@ -1,16 +1,24 @@
interface ButtonProps {
- children: string;
+ children?: string;
+ src?: string;
type: 'submit' | 'reset' | 'button' | undefined;
- onClick: () => void;
+ onClick?: () => void;
}
-const Button = ({ children, type, onClick }: ButtonProps) => {
+const Button = ({ children, src, type, onClick }: ButtonProps) => {
return (
- {children}
+ {src ? (
+
+ ) : (
+ children
+ )}
);
};
diff --git a/src/components/Form.tsx b/src/components/Form.tsx
index b8445b65..795ad6b3 100644
--- a/src/components/Form.tsx
+++ b/src/components/Form.tsx
@@ -1,64 +1,51 @@
import React from 'react';
+import { useState } from 'react';
+import Button from './Button';
type FormProps = {
name: string;
- mark: string;
+ src?: string;
+ children?: string;
+ onSubmit: (message: string) => void;
};
-const Form = ({ name, mark }: FormProps) => (
-
-
-
-
- From the blog
-
-
- Learn how to grow your business with our expert advice.
-
-
-
-
-
-
-
-
- Illo sint voluptas. Error voluptates culpa eligendi. Hic vel totam
- vitae illo. Non aliquid explicabo necessitatibus unde. Sed
- exercitationem placeat consectetur nulla deserunt vel. Iusto
- corrupti dicta.
-
-
-
-
-
+const Form = ({ name, src, children, onSubmit }: FormProps) => {
+ const [value, setValue] = useState('');
+
+ const handleChange = (event: React.ChangeEvent
) => {
+ setValue(event.target.value); // target : event발생당한 놈
+ };
+
+ const handleSubmit = (event: React.ChangeEvent) => {
+ event.preventDefault();
+ if (value.trim()) {
+ onSubmit(value);
+ setValue('');
+ }
+ };
+ return (
+
+
+
-
-);
+ );
+};
Form.defaultProps = {
- mark: '!',
+ name: '알 수 없음',
};
export default Form;
diff --git a/src/pages/Chat/ChatForm.tsx b/src/pages/Chat/ChatForm.tsx
index aacc4ca6..0567a8e9 100644
--- a/src/pages/Chat/ChatForm.tsx
+++ b/src/pages/Chat/ChatForm.tsx
@@ -1,31 +1,34 @@
+import { RootState } from '../../redux/store';
+import { useSelector, useDispatch } from 'react-redux';
import { useState } from 'react';
-import Profile from '../../components/Profile';
-import ChatHeader from './ChatHeader';
+import Form from '../../components/Form';
import Button from '../../components/Button';
+import { useLocalStorage } from '../../hooks/useLocalStorage';
-export default function ToDoList() {
- const [value, setValue] = useState('');
- const onChange = (event: React.FormEvent
) => {
- const {
- currentTarget: { value },
- } = event;
- setValue(value);
+import addCircle from '../../assets/addCircle.svg';
+import emoji from '../../assets/emoji.svg';
+export default function ChatForm() {
+ const userName = useSelector((state: RootState) => state.user.name);
+ const addMessage = (text: string) => {
+ // TODO : 메시지 저장 로직 추가
+ const newMessage = {
+ id: new Date().toString(),
+ text: text,
+ sender: userName,
+ timeStamp: new Date().toLocaleDateString,
+ };
};
- const onSubmit = (event: React.FormEvent) => {
- event.preventDefault();
- console.log(value);
- };
-
return (
-
-
+
+
+
);
}
From 1f8af7e75be812934ec3c5f700e9434bec89e83e Mon Sep 17 00:00:00 2001
From: heewon lee <84234411+hiwon-lee@users.noreply.github.com>
Date: Thu, 26 Sep 2024 21:43:30 +0900
Subject: [PATCH 14/74] =?UTF-8?q?style=20:=20=EC=A0=84=EC=97=AD=20?=
=?UTF-8?q?=EB=94=94=EC=9E=90=EC=9D=B8=20=EC=B6=94=EA=B0=80?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/reset.css | 134 +++++++++++++++++++++++++++++++++++++++++++++
tailwind.config.js | 2 +
2 files changed, 136 insertions(+)
create mode 100644 public/reset.css
diff --git a/public/reset.css b/public/reset.css
new file mode 100644
index 00000000..a7f850b8
--- /dev/null
+++ b/public/reset.css
@@ -0,0 +1,134 @@
+/* http://meyerweb.com/eric/tools/css/reset/
+ v2.0 | 20110126
+ License: none (public domain)
+*/
+
+html,
+body,
+div,
+span,
+applet,
+object,
+iframe,
+h1,
+h2,
+h3,
+h4,
+h5,
+h6,
+p,
+blockquote,
+pre,
+a,
+abbr,
+acronym,
+address,
+big,
+cite,
+code,
+del,
+dfn,
+em,
+img,
+ins,
+kbd,
+q,
+s,
+samp,
+small,
+strike,
+strong,
+sub,
+sup,
+tt,
+var,
+b,
+u,
+i,
+center,
+dl,
+dt,
+dd,
+ol,
+ul,
+li,
+fieldset,
+form,
+label,
+legend,
+table,
+caption,
+tbody,
+tfoot,
+thead,
+tr,
+th,
+td,
+article,
+aside,
+canvas,
+details,
+embed,
+figure,
+figcaption,
+footer,
+header,
+hgroup,
+menu,
+nav,
+output,
+ruby,
+section,
+summary,
+time,
+mark,
+audio,
+video {
+ margin: 0;
+ padding: 0;
+ border: 0;
+ font-size: 100%;
+ font: inherit;
+ vertical-align: baseline;
+}
+/* HTML5 display-role reset for older browsers */
+article,
+aside,
+details,
+figcaption,
+figure,
+footer,
+header,
+hgroup,
+menu,
+nav,
+section {
+ display: block;
+}
+body {
+ line-height: 1;
+ /* background-color: #252423; */
+ /* color: whitesmoke; */
+}
+ol,
+ul {
+ list-style: none;
+}
+blockquote,
+q {
+ quotes: none;
+}
+blockquote:before,
+blockquote:after,
+q:before,
+q:after {
+ content: '';
+ content: none;
+}
+table {
+ border-collapse: collapse;
+ border-spacing: 0;
+}
+button {
+ all: unset;
+}
diff --git a/tailwind.config.js b/tailwind.config.js
index 34ef6a02..46833312 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -12,9 +12,11 @@ module.exports = {
dark: '#53151A',
},
gray: {
+ 50: '#F1F1F1',
100: '#DFDFDF',
500: '#919191',
700: '#676767',
+ 900: '#212121',
},
},
fontSize: {
From d76e700e569ef7084d509941bbdbb312a1e8446e Mon Sep 17 00:00:00 2001
From: heewon lee <84234411+hiwon-lee@users.noreply.github.com>
Date: Thu, 26 Sep 2024 21:44:05 +0900
Subject: [PATCH 15/74] =?UTF-8?q?docs=20:=20ChattingBox=EC=82=AD=EC=A0=9C?=
=?UTF-8?q?=20=ED=9B=84,=20MessageItem=20=EB=A7=8C=EB=93=A6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/ChattingBox.tsx | 17 -----------------
1 file changed, 17 deletions(-)
delete mode 100644 src/components/ChattingBox.tsx
diff --git a/src/components/ChattingBox.tsx b/src/components/ChattingBox.tsx
deleted file mode 100644
index 950203ed..00000000
--- a/src/components/ChattingBox.tsx
+++ /dev/null
@@ -1,17 +0,0 @@
-import React from 'react';
-
-type GreetingsProps = {
- name: string;
- time: string;
- content: string;
-};
-
-const Greetings = ({ name, time, content }: GreetingsProps) => (
-
Hello, {name}
-);
-
-Greetings.defaultProps = {
- mark: '!',
-};
-
-export default Greetings;
From d988ce2d0e7a196e26a69b5719663c88e2becd57 Mon Sep 17 00:00:00 2001
From: heewon lee <84234411+hiwon-lee@users.noreply.github.com>
Date: Thu, 26 Sep 2024 21:44:24 +0900
Subject: [PATCH 16/74] =?UTF-8?q?docs=20:=20=EB=8C=80=ED=99=94=20=EC=9E=84?=
=?UTF-8?q?=EC=8B=9C=20=ED=8C=8C=EC=9D=BC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/data/messages.json | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
create mode 100644 src/data/messages.json
diff --git a/src/data/messages.json b/src/data/messages.json
new file mode 100644
index 00000000..81664e7b
--- /dev/null
+++ b/src/data/messages.json
@@ -0,0 +1,32 @@
+[
+ {
+ "id": "Thu Sep 26 2024 21:41:22 GMT+0900 (한국 표준시)",
+ "name": "박재원",
+ "sender": "sender",
+ "content": "안녕 재원아"
+ },
+ {
+ "id": "Thu Sep 26 2024 21:41:24 GMT+0900 (한국 표준시)",
+ "name": "박재원",
+ "sender": "sender",
+ "content": "반가워"
+ },
+ {
+ "id": "Thu Sep 26 2024 21:41:27 GMT+0900 (한국 표준시)",
+ "name": "박재원",
+ "sender": "sender",
+ "content": "나는 희원이야"
+ },
+ {
+ "id": "Thu Sep 26 2024 21:41:42 GMT+0900 (한국 표준시)",
+ "name": "박재원",
+ "sender": "sender",
+ "content": "00이지만"
+ },
+ {
+ "id": "Thu Sep 26 2024 21:41:50 GMT+0900 (한국 표준시)",
+ "name": "박재원",
+ "sender": "sender",
+ "content": "액면가는 05지"
+ }
+]
From dd8915de74611e7fe53cdf7f83a8838ae9d34e30 Mon Sep 17 00:00:00 2001
From: heewon lee <84234411+hiwon-lee@users.noreply.github.com>
Date: Thu, 26 Sep 2024 21:45:42 +0900
Subject: [PATCH 17/74] =?UTF-8?q?feat=20:=20=EC=B1=84=ED=8C=85=20submit?=
=?UTF-8?q?=ED=9B=84=20ChatMain=EC=97=90=20=EC=9A=94=EC=86=8C=20=EB=B0=98?=
=?UTF-8?q?=EC=98=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/MessageItem.tsx | 27 +++++++++++++++++++++++++++
src/hooks/useLocalStorage.ts | 33 +++++++++++++++++++++++++++++++++
src/pages/Chat/Chat.tsx | 31 +++++++++++++++++++++++++++++--
src/pages/Chat/ChatForm.tsx | 21 +++++++--------------
src/pages/Chat/ChatHeader.tsx | 13 ++++---------
src/pages/Chat/ChatInterface.ts | 18 ++++++++++++++++++
src/pages/Chat/ChatMain.tsx | 28 ++++++++++++++++++++++++----
7 files changed, 142 insertions(+), 29 deletions(-)
create mode 100644 src/components/MessageItem.tsx
create mode 100644 src/hooks/useLocalStorage.ts
create mode 100644 src/pages/Chat/ChatInterface.ts
diff --git a/src/components/MessageItem.tsx b/src/components/MessageItem.tsx
new file mode 100644
index 00000000..7ebd0ca8
--- /dev/null
+++ b/src/components/MessageItem.tsx
@@ -0,0 +1,27 @@
+import React from 'react';
+import { ChatInterface } from '../pages/Chat/ChatInterface';
+
+type ChattingProps = {
+ name: string; // 나
+ sender: string; // 상대방
+ time: string; // 메시지 친 시간
+ content: string; // 메시지 내용
+ timeStamp: string; // 언제썼는지
+ isOwnMessage: boolean; // 이 메시지가 내건지
+};
+
+const MessageItem = ({ isOwnMessage, content }: ChatInterface) => {
+ return (
+
+ {content}
+
+ );
+};
+
+export default MessageItem;
diff --git a/src/hooks/useLocalStorage.ts b/src/hooks/useLocalStorage.ts
new file mode 100644
index 00000000..0fc25ff4
--- /dev/null
+++ b/src/hooks/useLocalStorage.ts
@@ -0,0 +1,33 @@
+import { useState } from 'react';
+
+interface LocalStorageProps {
+ key: string;
+ initialValue: any; // 바꿔야 됨
+}
+// useLocalStorage : localStorage 관리하는 커스텀 훅
+export function useLocalStorage({ key, initialValue }: LocalStorageProps) {
+ // localStorage에서 값을 가져오거나 초기 값을 설정
+ const [storedValue, setStoredValue] = useState(() => {
+ try {
+ const item = window.localStorage.getItem(key); // key에 해당하는 놈들 가져옴
+ return item ? JSON.parse(item) : initialValue;
+ } catch (error) {
+ console.error('Error reading from localStorage', error);
+ return initialValue;
+ }
+ });
+
+ // setValue : localStorage에 값을 설정하는 함수
+ const setValue = (value: string | Function) => {
+ try {
+ const valueToStore =
+ value instanceof Function ? value(storedValue) : value; // value가 함수인 경우에 실행해주려구
+ setStoredValue(valueToStore);
+ window.localStorage.setItem(key, JSON.stringify(valueToStore)); // 다시 스토리지에 저장
+ } catch (error) {
+ console.error('Error setting localStorage', error);
+ }
+ };
+
+ return [storedValue, setValue];
+}
diff --git a/src/pages/Chat/Chat.tsx b/src/pages/Chat/Chat.tsx
index abba71a7..6ff9bac9 100644
--- a/src/pages/Chat/Chat.tsx
+++ b/src/pages/Chat/Chat.tsx
@@ -1,13 +1,40 @@
+import { useSelector } from 'react-redux';
+import { RootState } from '../../redux/store';
+import { useLocalStorage } from '../../hooks/useLocalStorage';
+import defaultMessages from '../../data/messages.json';
+
import ChatHeader from './ChatHeader';
import ChatMain from './ChatMain';
import ChatForm from './ChatForm';
+import { ChatInterface } from './ChatInterface';
+import { useEffect } from 'react';
+
export default function Chat() {
+ const userName = useSelector((state: RootState) => state.user.name);
+
+ const [messages, setMessages] = useLocalStorage({
+ key: 'messages',
+ initialValue: defaultMessages,
+ });
+
+ // addMessage : 메시지 저장 로직 추가 -> localStorage에 차곡히 쌓음
+ const addMessage = (text: string) => {
+ const newMessage = {
+ id: new Date().toString(),
+ name: userName,
+ sender: 'sender',
+ content: text,
+ timeStamp: new Date().toLocaleDateString,
+ };
+
+ setMessages([...messages, newMessage]);
+ };
return (
-
-
+
+ addMessage(text)} />
);
}
diff --git a/src/pages/Chat/ChatForm.tsx b/src/pages/Chat/ChatForm.tsx
index 0567a8e9..2785b1c7 100644
--- a/src/pages/Chat/ChatForm.tsx
+++ b/src/pages/Chat/ChatForm.tsx
@@ -1,32 +1,25 @@
import { RootState } from '../../redux/store';
import { useSelector, useDispatch } from 'react-redux';
-import { useState } from 'react';
import Form from '../../components/Form';
import Button from '../../components/Button';
-import { useLocalStorage } from '../../hooks/useLocalStorage';
import addCircle from '../../assets/addCircle.svg';
import emoji from '../../assets/emoji.svg';
-export default function ChatForm() {
+
+import { ChatFormInterface } from './ChatInterface';
+
+export default function ChatForm({ addMessage }: ChatFormInterface) {
const userName = useSelector((state: RootState) => state.user.name);
- const addMessage = (text: string) => {
- // TODO : 메시지 저장 로직 추가
- const newMessage = {
- id: new Date().toString(),
- text: text,
- sender: userName,
- timeStamp: new Date().toLocaleDateString,
- };
- };
+
return (
-
+
diff --git a/src/pages/Chat/ChatHeader.tsx b/src/pages/Chat/ChatHeader.tsx
index 0b288df6..5996d838 100644
--- a/src/pages/Chat/ChatHeader.tsx
+++ b/src/pages/Chat/ChatHeader.tsx
@@ -1,20 +1,15 @@
import type { RootState } from '../../redux/store';
-import { useSelector, useDispatch } from 'react-redux';
+import { useSelector } from 'react-redux';
import { setUser } from '../../redux/userSlice';
+import { ChatInterface } from './ChatInterface';
import prevButton from '../../assets/prevButton.png';
import Profile from '../../components/Profile';
-interface ChatInfoInterface {
- user: string;
- recentTime: string;
-}
+// ChatHeader : 현재 누구와 대화하고 있는 지 확인할 수 있음
export default function ChatHeader() {
const userName = useSelector((state: RootState) => state.user.name);
const recentTime = '화요일 오후 2시';
- const dispatch = useDispatch();
-
- // TODO : 여기에다가 이미지 주소 추가하고 아닌 경우 '박'이라고 일단은 두기로
return (
@@ -25,7 +20,7 @@ export default function ChatHeader() {
/>
-
{userName}
+
{userName || '박'}
{recentTime}
diff --git a/src/pages/Chat/ChatInterface.ts b/src/pages/Chat/ChatInterface.ts
new file mode 100644
index 00000000..cc6e04da
--- /dev/null
+++ b/src/pages/Chat/ChatInterface.ts
@@ -0,0 +1,18 @@
+export interface ChatInterface {
+ name: string; // 나
+ sender: string; // 상대방
+ time: string; // 메시지 친 시간
+ content: string; // 메시지 내용
+ timeStamp: string; // 언제썼는지
+ isOwnMessage: boolean; // 이 메시지가 내건지
+}
+
+// ChatMainInterface : ChatInterface로 이뤄진 배열
+export interface ChatMainInterface {
+ messages: ChatInterface[];
+}
+
+// ChatFormProps : localStorage내부 배열에 채팅메시지 추가
+export interface ChatFormInterface {
+ addMessage: (text: string) => void;
+}
diff --git a/src/pages/Chat/ChatMain.tsx b/src/pages/Chat/ChatMain.tsx
index 3b97ebef..1d420c0e 100644
--- a/src/pages/Chat/ChatMain.tsx
+++ b/src/pages/Chat/ChatMain.tsx
@@ -1,6 +1,26 @@
-import Profile from '../../components/Profile';
-import ChatHeader from './ChatHeader';
+import { useEffect } from 'react';
+import type { RootState } from '../../redux/store';
+import { useSelector } from 'react-redux';
+import MessageItem from '../../components/MessageItem';
+import { ChatMainInterface } from './ChatInterface';
-export default function ChatMain() {
- return
chatmain
;
+export default function ChatMain({ messages }: ChatMainInterface) {
+ const userName = useSelector((state: RootState) => state.user.name);
+
+ return (
+
+ {messages.map((message) => (
+
+
+
+ ))}
+
+ );
}
From dab9d0771c3950fca15ac19cfd3b9e1075c776ab Mon Sep 17 00:00:00 2001
From: heewon lee <84234411+hiwon-lee@users.noreply.github.com>
Date: Thu, 26 Sep 2024 21:45:57 +0900
Subject: [PATCH 18/74] =?UTF-8?q?docs=20:=20=EC=A3=BC=EC=84=9D=20=EC=82=AD?=
=?UTF-8?q?=EC=A0=9C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/redux/userSlice.ts | 26 --------------------------
1 file changed, 26 deletions(-)
diff --git a/src/redux/userSlice.ts b/src/redux/userSlice.ts
index 9055abcb..19a9abe3 100644
--- a/src/redux/userSlice.ts
+++ b/src/redux/userSlice.ts
@@ -1,29 +1,3 @@
-// import { createSlice } from '@reduxjs/toolkit';
-
-// const initialState = {
-// _id: '',
-// name: '',
-// profile_img: '',
-// };
-
-// export const userSlice = createSlice({
-// name: 'user',
-// initialState,
-// reducers: {
-// setUser: (state, action) => {
-// state._id = action.payload._id;
-// state.name = action.payload.name;
-// state.profile_img = action.payload.profile_img;
-// },
-// },
-// });
-
-// // Action creators are generated for each case reducer function
-// export const { setUser, setToken, logout, setOnlineUser, setSocketConnection } =
-// userSlice.actions;
-
-// export default userSlice.reducer;
-
import { createSlice } from '@reduxjs/toolkit';
import type { PayloadAction } from '@reduxjs/toolkit';
From d70c136026f6ff85bc51fff0aa03a1d0a2b5dac9 Mon Sep 17 00:00:00 2001
From: heewon lee <84234411+hiwon-lee@users.noreply.github.com>
Date: Thu, 26 Sep 2024 21:46:27 +0900
Subject: [PATCH 19/74] =?UTF-8?q?style(Form)=20:=20=EB=94=94=EC=9E=90?=
=?UTF-8?q?=EC=9D=B8=20=EC=88=98=EC=A0=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/Form.tsx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/components/Form.tsx b/src/components/Form.tsx
index 795ad6b3..97179aea 100644
--- a/src/components/Form.tsx
+++ b/src/components/Form.tsx
@@ -24,13 +24,13 @@ const Form = ({ name, src, children, onSubmit }: FormProps) => {
}
};
return (
-