Toggle 형식으로 사용하던 version
{totalPageNum === 0 ?
(
<div class="undefinedText">검색결과가 없습니다.</div>
) : (
<div>
<div class="border-b">
{noticeList.map((val,key) => (
<div class="accordionWrap">
<Acoodionwrap>
<div class="Question">
<Question key={key}>
Q. {val.faqQuestion}
</Question>
</div>
<Answer key={key}>
<pre class="answerText">
{val.faqAnswer}
</pre>
</Answer>
</Acoodionwrap>
</div>
))}
</div>
<MoreBtn moreNotice={moreNotice} status={status} />
</div>
)}
논리연산자로 대체한 version
<div class="border-b">
{noticeList.map((val,key) => (
<div class="accordionWrap">
<Acoodionwrap>
<div class="Question">
<Question key={key}>
Q. {val.faqQuestion}
</Question>
</div>
<Answer key={key}>
<pre class="answerText">
{val.faqAnswer}
</pre>
</Answer>
</Acoodionwrap>
</div>
{totalPageNum === 0 &&
<div class="undefinedText">검색결과가 없습니다.</div>
}