show proper display name for source

This commit is contained in:
Aria Moradi
2021-09-18 00:03:42 +04:30
parent f17c612d10
commit a7a4443209
2 changed files with 3 additions and 3 deletions

View File

@@ -121,8 +121,8 @@ interface IProps{
} }
function getSourceName(source: ISource) { function getSourceName(source: ISource) {
if (source.name !== null) { if (source.displayName !== null) {
return `${source.name} (${source.lang.toLocaleUpperCase()})`; return source.displayName;
} }
return source.id; return source.id;
} }

2
src/typings.d.ts vendored
View File

@@ -25,9 +25,9 @@ interface ISource {
lang: string lang: string
iconUrl: string iconUrl: string
supportsLatest: boolean supportsLatest: boolean
history: any
isConfigurable: boolean isConfigurable: boolean
isNsfw: boolean isNsfw: boolean
displayName: string
} }
interface IMangaCard { interface IMangaCard {