Update to work with Character's different stars
This commit is contained in:
parent
320bbf9f3a
commit
20dc930f5c
1 changed files with 19 additions and 7 deletions
|
|
@ -6,26 +6,38 @@ import './index.css'
|
|||
|
||||
|
||||
interface Props {
|
||||
type: 'character' | 'weapon' | 'summon'
|
||||
rarity?: number
|
||||
uncapLevel: number
|
||||
flb: boolean
|
||||
ulb: boolean
|
||||
ulb?: boolean
|
||||
}
|
||||
|
||||
const UncapIndicator = (props: Props) => {
|
||||
let numStars
|
||||
if (props.ulb) {
|
||||
numStars = 5
|
||||
} else if (props.flb) {
|
||||
numStars = 4
|
||||
|
||||
if (props.type === 'character') {
|
||||
if (props.flb) {
|
||||
numStars = 5
|
||||
} else {
|
||||
numStars = 4
|
||||
}
|
||||
} else {
|
||||
numStars = 3
|
||||
if (props.ulb) {
|
||||
numStars = 5
|
||||
} else if (props.flb) {
|
||||
numStars = 4
|
||||
} else {
|
||||
numStars = 3
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<ul className="UncapIndicator">
|
||||
{
|
||||
Array.from(Array(numStars)).map((x, i) => {
|
||||
if (i > 2) {
|
||||
if (props.type === 'character' && i > 3 ||
|
||||
props.type !== 'character' && i > 2) {
|
||||
return <UncapStar uncap={true} key={`star_${i}`} />
|
||||
} else {
|
||||
return <UncapStar uncap={false} key={`star_${i}`} />
|
||||
|
|
|
|||
Loading…
Reference in a new issue