아래의 함수로 불러오는 데이터의 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);
};
다른 에러와는 다르게 어떠한 링크를 표시해 주는데, 그곳에서 아래와 같이 색인 추가를 해달라는 뜻이다.