
git stash
๋์๊ฒ git stash๋ ๋จ์ํ Pull ์ด ์๋ ๋ ๋ด๊ฐ ํ๋ ๊ฑฐ ์ ์ฅํด๋๊ณ pull์ด๋ push๋ ํ๋ ๊ฑฐ์๋๋ฐ...
git stash ๋ฅผ ํ์ ๋ด๊ฐ ๋ฐค์์ ๋ง๋ค์๋ ๋ทฐ๊ฐ ๋ ์๊ฐ๋ค..
๊ทผ๋ฐ ์ปค๋ฐ๋ด์ญ์ด ์์ด์ ๊ทธ๋ฐ์ง

์ด๊ฒ ์ด์์๊ธดํ๋๋ฐ... git log์๋ ๋ด์ญ์ด ์์์
๊ทผ๋ฐ ํ์ผ ์์ฒด๋ฅผ ๋ค๋ฅธ ๊ณณ์ ๋ฐฑ์
ํด๋๊ธดํด์ ๋ง ๋ถ์ํ์ง ์์์ง๋ง,,
๊ฒฐ๊ตญ์ ๊ฐ์ ธ์์ ์ดใท์ฐ ์ด์ฐ ๋ณต๊ตฌํจ..
๊ทธ๋์ git stash์ ๋ํ ๊ฐ๋
์ ์ ํํ ์ง๊ณ ๋์ด๊ฐ์ผ ํ ๊ฒ ๊ฐ๋ค.
stash๋ ์ผ๋จ ๋ง๋ฌด๋ฆฌ๋์ง ์์ ์์ ์ ์์๋ก ์คํ์ ์ ์ฅํ๋ ๊ฒ์ธ๋ฐ..
git stash ๋ช ๋ น์ ์ฌ์ฉํ๋ฉด ์ํน ๋๋ ํ ๋ฆฌ์์ ์์ ํ ํ์ผ๋ค๋ง ์ ์ฅ
- Modified์ด๋ฉด์ Tracked ์ํ์ธ ํ์ผ
- Tracked ์ํ์ธ ํ์ผ์ ์์ ํ ๊ฒฝ์ฐ
- Tracked: ๊ณผ๊ฑฐ์ ์ด๋ฏธ commitํ์ฌ ์ค๋ ์ท์ ๋ฃ์ด์ง ๊ด๋ฆฌ ๋์ ์ํ์ ํ์ผ
- Staging Area์ ์๋ ํ์ผ(Staged ์ํ์ ํ์ผ)
- git add ๋ช ๋ น์ ์คํํ ๊ฒฝ์ฐ
- Staged ์ํ๋ก ๋ง๋ค๋ ค๋ฉด git add ๋ช ๋ น์ ์คํํด์ผ ํ๋ค.
- git add๋ ํ์ผ์ ์๋ก ์ถ์ ํ ๋๋ ์ฌ์ฉํ๊ณ ์์ ํ ํ์ผ์ Staged ์ํ๋ก ๋ง๋ค ๋๋ ์ฌ์ฉํ๋ค.
git stash list ๋ฅผ ์ฌ์ฉํ๋ฉด stash๋ ๋ชฉ๋ก์ ๋ณผ์์๋ค.
git stash apply or git stash apply --index ๋ฅผ ์ฌ์ฉํ๋ฉด ๊ฐ์ฅ ์ต๊ทผ์ stash ๋ ํ์ผ์ ์ ์ฉ์์ผ์ค๋ค.
(์ฐธ๊ณ : https://gmlwjd9405.github.io/2018/05/18/git-stash.html)
ํค๋ ์ฐ๊ฒฐ
{
headers: { Authorization: getACCESS_TOKEN() },
}
getACCESS_TOKEN์ด ์ฟ ํค์ ์ ์ฅ๋์ด์๋๋ฐ
export const getACCESS_TOKEN = () => cookies.get(ACCESS_TOKEN);
ํจ์์ด๋ฏ๋ก ()๋ฅผ ๋ถ์ฌ์ค๋ค.
๊ทธ๋ฆฌ๊ณ ์ฒ์์ Authorization์ ์จ์ฃผ์ง ์์์๋๋ฐ,
Authorization์ ๊ฒ์ํด๋ณด๋ฉด ์ธ์ฆ ํ ํฐ(JWT๋ , Bearer ํ ํฐ์ด๋ )์ ์๋ฒ๋ก ๋ณด๋ผ ๋ ์ฌ์ฉํ๋ ํค๋๋ผ๊ณ ๋์ด. ๊ทธ๋๊น ๊ฐ๋จํ ๋งํด์ ์๋ฒ์ ํค๋๋ฅผ ์์ฒญํ ๋ ์ฌ์ฉํ๋ ๊ฒ์ด๋ผ๊ณ .
๋ธ๋์น๊ฐ ์์ ์์ ๋
๋ธ๋์น๊ฐ 'origin/...'๋ณด๋ค 1๊ฐ ์ปค๋ฐ๋งํผ ์์ ์์ต๋๋ค.
์ด๋๋ pull ๋ push๋ ์๋๋ค
ํด๊ฒฐ : git pull --rebase
๋ณ์์ Math.ceil ์ฌ์ฉ
{Math.ceil({item.price / item.monthlyPayment})}๊ฐ์
์ด๊ฑด ์ฌ์ฉ ๋ถ๊ฐํจ
์?
์ค๊ดํธ๊ฐ ๋๋ฒ์ฐ์ฌ์์ธ๊ฐ?
{Math.ceil(item.price / item.monthlyPayment)}๊ฐ์
์ด๋ ๊ฒ ํ๋ฉด ๋๋ ๊ฑธ
๋ฐ๋ณด๋ ์ด๋ฐ ๋ฐ๋ณด๊ฐ ์์
div style = {{}}
๋น์ฐํ๋ฏ ์ค๊ดํธ๋ฅผ ๋ ๋ฒ ์ป๋๋ฐ,
์ ์ค๊ดํธ๋ฅผ ๋ ๋ฒ ์ฐ๋๊ฐ?์ ๋ํ ์๋ฌธ์ด ์๊น
์ผ๋จ ๋ณ์์์ ํ ๋ฒ {}๊ฐ ์ฌ์ฉ๋๊ณ ,
๊ทธ ์์ ๋ค์ด๊ฐ๋ ์ ๋ณด๊ฐ object ํ์
์ด๊ธฐ ๋๋ฌธ์ ๋๋ฒ์งธ {}๊ฐ ์ฌ์ฉ๋๋ ๊ฒ.
input value ์๋ฌ

react_devtools_backend.js:4012 Warning: You provided a value prop to a form field without an onChange handler. This will render a read-only field. If the field should be mutable use defaultValue. Otherwise, set either onChange or readOnly.
<input> ํ๊ทธ ์ฌ์ฉ์ value์์ฑ์ด ๊ณ ์ ๊ฐ์ด ์๋๋ผ ๋๋ ์๋ฌ
๊ทธ๋์ input ์ ์๋ value ๋ฅผ defaultValue๋ก ๊ณ ์ณ์ฃผ์๋๋ ๋์ด์ ์๋ฌ๊ฐ ๋์ง ์์๋ค.
<TextField
id="outlined-helperText"
label="์ ์
๊ธ์ก"
variant="outlined"
defaultValue={detailData.monthlyPayment}
onChange={(e) => setMonthPrice(e.target.value)}
style={{ margin: '24px', width: 300 }}
/>
[object%20Object]
์์ง ํด๊ฒฐํ์ง ๋ชปํ...
๋ ์ง์์ T ์ง์ฐ๊ธฐ
const date = new Date(detailData.createdAt);
const createDate = date.toISOString().replace('T', ' ').substring(0, 19);
console.log(createDate);

๋ฐ์์จ ์๊ฐ์ด 3์๊ฐ ๋ฆ๋ ์ด์
ec2 ์๋ฒ์๊ฐ์ด UTC ์ธ๊ณ ํ์ค์๋ก ๋์ด์์ด์ ๊ทธ๋ ๋ค๊ณ ..
์์ธ ์๊ฐ์ผ๋ก ๋ณ๊ฒฝํด์ฃผ๋ฉด ๋๋ค๊ณ ํ๋ค.
type is invalid

Warning: React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: object. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
์ฌ์ฉํ์ง ์๊ธฐ๋กํ ํ์ด์ง ์ฐ๊ฒฐ์ app.js์์ ์์ด๋๋ ํด๊ฒฐ
์ฒ์ ์๋ฆฌ ๋ง๋ค ์ ์ฐ๊ธฐ
.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')
defaultValue={detailData.monthlyPayment
.toString()
.replace(/\B(?=(\d{3})+(?!\d))/g, ',')}
```
'Project > Main-project' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[SEB 41] Main Project (6) ๋ง๋ฌด๋ฆฌ ํ๊ณ (0) | 2023.05.18 |
---|---|
[SEB 41] Main Project (5) chart ๊ธฐ๋ฅ ์ถ๊ฐ, css ๋ง๋ฌด๋ฆฌ, ๋ฐ์ํ ๊ตฌํ (0) | 2023.05.18 |
[SEB 41] Main Project (4) ๋ฐฐํฌ ํ ๋ง๋ฌด๋ฆฌ ๋ฌธ์ ์ +ํด๊ฒฐ (1) | 2023.05.18 |
[SEB 41] Main Project (2) ๋ชฉํ ๊ฒ์๊ธ CRUD ๊ธฐ๋ฅ ๊ตฌํ (0) | 2023.05.18 |
[SEB 41] Main Project (1) ์ด๊ธฐ ํ ๊ท์น, ๊ธฐ๋ณธ ์ ์์ ์์ฑ (0) | 2023.05.18 |