나에게 git stash는 단순히 Pull 이 안될 때 내가 하던 거 저장해놓고 pull이든 push든 하는 거였는데...
git stash 를 하자 내가 밤새서 만들었던 뷰가 날아갔다..
근데 커밋내역이 있어서 그런지
이게 살아있긴했는데... git log에는 내역이 없었음
근데 파일 자체를 다른 곳에 백업해놓긴해서 막 불안하진 않았지만,,
결국엔 가져와서 어ㄷ찌 어찌 복구함..
그래서 git stash에 대한 개념을 정확히 짚고 넘어가야 할 것 같다.
stash는 일단 마무리되지 않은 작업을 임시로 스택에 저장하는 것인데..
git stash
명령을 사용하면 워킹 디렉토리에서 수정한 파일들만 저장
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({item.price / item.monthlyPayment})}개월
이건 사용 불가함
왜?
중괄호가 두번쓰여서인가?
{Math.ceil(item.price / item.monthlyPayment)}개월
이렇게 하면 되는 걸
바보도 이런 바보가 없음
당연하듯 중괄호를 두 번 썻는데,
왜 중괄호를 두 번 쓰는가?에 대한 의문이 생김
일단 변수에서 한 번 {}
가 사용되고,
그 안에 들어가는 정보가 object 타입이기 때문에 두번째 {}
가 사용되는 것.
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 }}
/>
아직 해결하지 못한...
const date = new Date(detailData.createdAt);
const createDate = date.toISOString().replace('T', ' ').substring(0, 19);
console.log(createDate);
ec2 서버시간이 UTC 세계 표준시로 되어있어서 그렇다고..
서울 시간으로 변경해주면 된다고 한다.
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, ',')}
```