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 {
|
interface Props {
|
||||||
|
type: 'character' | 'weapon' | 'summon'
|
||||||
|
rarity?: number
|
||||||
uncapLevel: number
|
uncapLevel: number
|
||||||
flb: boolean
|
flb: boolean
|
||||||
ulb: boolean
|
ulb?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
const UncapIndicator = (props: Props) => {
|
const UncapIndicator = (props: Props) => {
|
||||||
let numStars
|
let numStars
|
||||||
if (props.ulb) {
|
|
||||||
numStars = 5
|
if (props.type === 'character') {
|
||||||
} else if (props.flb) {
|
if (props.flb) {
|
||||||
numStars = 4
|
numStars = 5
|
||||||
|
} else {
|
||||||
|
numStars = 4
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
numStars = 3
|
if (props.ulb) {
|
||||||
|
numStars = 5
|
||||||
|
} else if (props.flb) {
|
||||||
|
numStars = 4
|
||||||
|
} else {
|
||||||
|
numStars = 3
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ul className="UncapIndicator">
|
<ul className="UncapIndicator">
|
||||||
{
|
{
|
||||||
Array.from(Array(numStars)).map((x, i) => {
|
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}`} />
|
return <UncapStar uncap={true} key={`star_${i}`} />
|
||||||
} else {
|
} else {
|
||||||
return <UncapStar uncap={false} key={`star_${i}`} />
|
return <UncapStar uncap={false} key={`star_${i}`} />
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue