Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions src/components/KeywordCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,18 @@ interface KeywordCardProps {
text?: string;
}

export default function KeywordCard({
question,
keyword = '',
text = '',
}: KeywordCardProps) {

const finalKeyword = keyword.trim() === '' ? '아직 등록된 키워드가 없어요' : keyword;
const finalText = text.trim() === '' ? '등록된 설명이 없어요' : text;
export default function KeywordCard({ question, keyword = '', text = '' }: KeywordCardProps) {
const finalKeyword = keyword?.trim() === '' ? '아직 등록된 키워드가 없어요' : keyword;
const finalText = text?.trim() === '' ? '등록된 설명이 없어요' : text;

return (
<div className="mb-5">
<p className="text-[#F56156] text-[13px] font-[pretendard] font-medium text-sm pb-[9px]">
{question}
</p>
<p className="text-black text-[16px] font-[pretendard] font-semibold pb-[7px]"># {finalKeyword}</p>
<p className="text-black text-[16px] font-[pretendard] font-semibold pb-[7px]">
# {finalKeyword}
</p>
<p className="text-black text-[13px] font-[pretendard] font-regular">{finalText}</p>
</div>
);
Expand Down