본문 바로가기

분류 전체보기

(293)
페이지 최초 렌더링시 useEffect로 해당 게시글 id값 위치로 scroll시키기(자동스크롤) const targetId = document.getElementById(`usage${customerCenterId}`) useEffect(()=>{ if(!(customerCenterId === null || customerCenterId === undefined)){ targetId?.scrollIntoView({behavior:'smooth',top:targetId.offsetTop}) } },[customerCenterId]) return ( 힐리어리 앱에 대해 궁금하신 점을 문의해주세요. {customerCenter?.map((el,idx)=>( {dispatch(onSetCustomerCenterQList(el?.id));navigate("/contact/usageqa")}} > {Inqui..
tailwind에 background image 직접삽입 import React, { useEffect } from 'react' import { useDispatch } from 'react-redux' import { adminSideTitle } from '../../features/admin/commonAdmin' import Navbar from './components/common/Navbar' import Sidebar from './components/common/Sidebar' const AdminMain = () => { const dispatch = useDispatch() useEffect(()=>{ dispatch(adminSideTitle("home")) },[]) return ( this is the recent title this ..
Permission denied (publickey,gssapi-keyex,gssapi-with-mic). Permission denied (publickey,gssapi-keyex,gssapi-with-mic). aws 접속하기 위해..위 에러가 떠서 원인을 살펴보다가 ,, ircc-keyframe 파일에 chmod 400으로 권한 설정을 해줘서 그런건지? 해당 파일에 접근할수 없도록 하단과 같은 에러가 떴다. ls: .: Operation not permitted 구글링해 보니 맥북 기준 설정의 보안에서 터미널의 입력권한?을 활성화 시켜줘야 동작하였다. 참고링크: https://saurus2.tistory.com/entry/ls-Operation-not-permitted-mac-OS-%EB%A7%A5%EB%B6%81-%ED%84%B0%EB%AF%B8%EB%84%90-%EC%97%90%EB%9F%AC
psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: FATAL: password authentication failed for user "xxx" https://gabrielinnocentrockerfeller.medium.com/how-to-fix-fatal-password-authentication-failed-for-user-postgres-in-ubuntu-20-4-f7c6d2856fc9 출처: How to Fix FATAL: password authentication failed for user “postgres” in ubuntu 20.4 After a fresh installation of PostgreSQL on my machine, I was frustrated by the fact that it didn’t work seamlessly with my Django… gabrielinnocentrockerfeller.medium.co..
맥북 꺼지지 않게 유지하기 설정 > 에너지 절약(배터리) > 디스플레이가 꺼져있을떄 컴퓨터를 자동으로 잠자지 않게 하기 클릭 !
[0]react-dom.development.js:67 Warning: validateDOMNesting(...): Whitespace text nodes cannot appear as a child of <tbody>. Make sure you don't have any extra whitespace between tags on each line of your source code. => 이전부터 계속 해결하고 싶었던 에러이다. 계속 비슷한 상황이 반복되니 해결해야겠다 싶어 코드를 자세히 보면서 디버깅을 해보니, 위 에러인 즉슨 tbody안에 공백이 들어간다는 내용인 것 같았다. 나의 경우에는 화면을 띄워주는 return문안에서 삼항식 사용시 값이 없으면 빈값을 전달해서 생기는 오류로 보여졌다. 비슷한 경우의 분들이 계시면 table 내에서 삼항식 사용시 빈값을 부여하지 않았는지 확인해보시길 바란다. {tabName ==="aaa" && EachPage ? EachPage.map((data,idx)=>( )) : tabName ==="bbb"? EachPage.map((data,idx)=>( )) :"" ////////이부분이 에러의 원인이였음 !! }
[nestjs, sql] typeorm으로 동적 where 조건문 생성하기(동적 쿼리 생성) //null을 제외한 where조건문 생성 - 동적 쿼리 생성 var whereQuery = {} if(req.lcategory) whereQuery['lcategory'] = req.lcategory if(req.mcategory) whereQuery['mcategory'] = req.mcategory if(req.scategory) whereQuery['scategory'] = req.scategory let searchTotalGuide = await getRepository(FoodGuide).find({ relations:['addAdmin','editAdmin'], where: whereQuery, order: { createdAt: 'DESC', }, }); result.guidList = ..
[0][react]useEffect 함수실행, navigate , console.log is not working useEffect내에서 console.log가 찍히지 않을때 => 1.비동기함수가 더 빠르게 작동하지 않는지 체크해볼것 ! ! 2.return 하여 렌더링되는 페이지 안에 출력되야하는 결과물이 있는지 확인할것, (있다면 해당 결과물을 조건식으로 감쌀것 ) ///해결된 실행문 const [userInPage, setUserInPage] = useState(false) useEffect(() => { //1.user === "nouser"일때 navigate()으로 코드 짰는데, 비동기 함수가 더 빠르게 작동, //따라서 if 문의 순서를 바꾸었더니 작동함. if(user !== "nouser"){ setUserInPage(true) dispatch(fetchAllUsers()); dispatch(fetch..