fix(TagInfo): Tag names automatically fall back to `slug_name`

This commit is contained in:
haitaoo 2023-03-23 17:01:52 +08:00
parent 6a89c9be5f
commit e26bfd68fb
2 changed files with 5 additions and 2 deletions

View File

@ -30,7 +30,9 @@ const Index: FC<IProps> = ({
data.recommend && 'badge-tag-required', data.recommend && 'badge-tag-required',
className, className,
)}> )}>
<span className={textClassName}>{data.display_name}</span> <span className={textClassName}>
{data.display_name || data.slug_name}
</span>
</Link> </Link>
); );
}; };

View File

@ -204,7 +204,8 @@ const TagIntroduction = () => {
data={{ data={{
slug_name: tagName || '', slug_name: tagName || '',
main_tag_slug_name: '', main_tag_slug_name: '',
display_name: '', display_name:
tagInfo?.display_name || tagInfo?.slug_name || '',
recommend: false, recommend: false,
reserved: false, reserved: false,
}} }}