fix: minor ui issues

This commit is contained in:
Liyas Thomas
2023-12-07 17:12:33 +05:30
parent 6063c633ee
commit 87395a4553
8 changed files with 59 additions and 65 deletions

View File

@@ -26,10 +26,9 @@ export type Banner = {
const getBannerWithHighestScore = (list: Banner[]) => {
if (list.length === 0) return null
else if (list.length === 1) return list[0]
else {
const highestScore = Math.max(...list.map((banner) => banner.content.score))
return list.find((banner) => banner.content.score === highestScore)
}
const highestScore = Math.max(...list.map((banner) => banner.content.score))
return list.find((banner) => banner.content.score === highestScore)
}
/**