Firebase 정렬에러..

준영·2023년 3월 9일
0

Firebase를 써보자..

목록 보기
7/8

아래의 함수로 불러오는 데이터의 timestamp 값을 기준으로 정렬하려는데 에러가난다.

// comment list load func
const fetchComments = async () => {
  const comments = collection(firebaseDb, "comment");
  const result = await getDocs(
    query(
      comments,
      where("id", "==", props.boardData.id),
      orderBy("timestamp", "desc")
    )
  );
  const fetchData = result.docs.map((el) => el.data());
  setCommentsData(fetchData);
};

다른 에러와는 다르게 어떠한 링크를 표시해 주는데, 그곳에서 아래와 같이 색인 추가를 해달라는 뜻이다.

profile
개인 이력, 포폴 관리 및 기술 블로그 사이트 👉 https://aimzero-web.vercel.app/

0개의 댓글