Remove console logs
This commit is contained in:
parent
6ef73583df
commit
725e989bd7
3 changed files with 110 additions and 89 deletions
|
|
@ -47,10 +47,6 @@ const JobSection = (props: Props) => {
|
||||||
setSkillRefs(Array(numSkills).fill(React.createRef<HTMLDivElement>()))
|
setSkillRefs(Array(numSkills).fill(React.createRef<HTMLDivElement>()))
|
||||||
}, [numSkills])
|
}, [numSkills])
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
console.log(skillRefs)
|
|
||||||
}, [skillRefs])
|
|
||||||
|
|
||||||
function receiveJob(job?: Job) {
|
function receiveJob(job?: Job) {
|
||||||
console.log(`Receiving job! Row ${job?.row}: ${job?.name.en}`)
|
console.log(`Receiving job! Row ${job?.row}: ${job?.name.en}`)
|
||||||
if (job) {
|
if (job) {
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,6 @@ const SearchModal = (props: Props) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
function fetchResults({ replace = false }: { replace?: boolean }) {
|
function fetchResults({ replace = false }: { replace?: boolean }) {
|
||||||
console.log("Fetch results!!!")
|
|
||||||
api
|
api
|
||||||
.search({
|
.search({
|
||||||
object: props.object,
|
object: props.object,
|
||||||
|
|
@ -82,8 +81,6 @@ const SearchModal = (props: Props) => {
|
||||||
page: currentPage,
|
page: currentPage,
|
||||||
})
|
})
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
console.log("resp")
|
|
||||||
console.log(response)
|
|
||||||
setTotalPages(response.data.total_pages)
|
setTotalPages(response.data.total_pages)
|
||||||
setRecordCount(response.data.count)
|
setRecordCount(response.data.count)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
import React, { useEffect, useRef, useState } from 'react'
|
import React, { useEffect, useRef, useState } from "react"
|
||||||
import UncapStar from '~components/UncapStar'
|
import UncapStar from "~components/UncapStar"
|
||||||
|
|
||||||
import './index.scss'
|
import "./index.scss"
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
type: 'character' | 'weapon' | 'summon'
|
type: "character" | "weapon" | "summon"
|
||||||
rarity?: number
|
rarity?: number
|
||||||
uncapLevel?: number
|
uncapLevel?: number
|
||||||
flb: boolean
|
flb: boolean
|
||||||
|
|
@ -20,7 +20,7 @@ const UncapIndicator = (props: Props) => {
|
||||||
function setNumStars() {
|
function setNumStars() {
|
||||||
let numStars
|
let numStars
|
||||||
|
|
||||||
if (props.type === 'character') {
|
if (props.type === "character") {
|
||||||
if (props.special) {
|
if (props.special) {
|
||||||
if (props.ulb) {
|
if (props.ulb) {
|
||||||
numStars = 5
|
numStars = 5
|
||||||
|
|
@ -59,41 +59,69 @@ const UncapIndicator = (props: Props) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const transcendence = (i: number) => {
|
const transcendence = (i: number) => {
|
||||||
return <UncapStar ulb={true} empty={ (props.uncapLevel) ? i >= props.uncapLevel : false } key={`star_${i}`} index={i} onClick={toggleStar} />
|
return (
|
||||||
|
<UncapStar
|
||||||
|
ulb={true}
|
||||||
|
empty={props.uncapLevel ? i >= props.uncapLevel : false}
|
||||||
|
key={`star_${i}`}
|
||||||
|
index={i}
|
||||||
|
onClick={toggleStar}
|
||||||
|
/>
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
const ulb = (i: number) => {
|
const ulb = (i: number) => {
|
||||||
return <UncapStar ulb={true} empty={ (props.uncapLevel) ? i >= props.uncapLevel : false } key={`star_${i}`} index={i} onClick={toggleStar} />
|
return (
|
||||||
|
<UncapStar
|
||||||
|
ulb={true}
|
||||||
|
empty={props.uncapLevel ? i >= props.uncapLevel : false}
|
||||||
|
key={`star_${i}`}
|
||||||
|
index={i}
|
||||||
|
onClick={toggleStar}
|
||||||
|
/>
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
const flb = (i: number) => {
|
const flb = (i: number) => {
|
||||||
return <UncapStar flb={true} empty={ (props.uncapLevel) ? i >= props.uncapLevel : false } key={`star_${i}`} index={i} onClick={toggleStar} />
|
return (
|
||||||
|
<UncapStar
|
||||||
|
flb={true}
|
||||||
|
empty={props.uncapLevel ? i >= props.uncapLevel : false}
|
||||||
|
key={`star_${i}`}
|
||||||
|
index={i}
|
||||||
|
onClick={toggleStar}
|
||||||
|
/>
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
const mlb = (i: number) => {
|
const mlb = (i: number) => {
|
||||||
// console.log("MLB; Number of stars:", props.uncapLevel)
|
// console.log("MLB; Number of stars:", props.uncapLevel)
|
||||||
return <UncapStar empty={ (props.uncapLevel) ? i >= props.uncapLevel : false } key={`star_${i}`} index={i} onClick={toggleStar} />
|
return (
|
||||||
|
<UncapStar
|
||||||
|
empty={props.uncapLevel ? i >= props.uncapLevel : false}
|
||||||
|
key={`star_${i}`}
|
||||||
|
index={i}
|
||||||
|
onClick={toggleStar}
|
||||||
|
/>
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ul className="UncapIndicator">
|
<ul className="UncapIndicator">
|
||||||
{
|
{Array.from(Array(numStars)).map((x, i) => {
|
||||||
Array.from(Array(numStars)).map((x, i) => {
|
if (props.type === "character" && i > 4) {
|
||||||
if (props.type === 'character' && i > 4) {
|
if (props.special) return ulb(i)
|
||||||
if (props.special)
|
else return transcendence(i)
|
||||||
return ulb(i)
|
|
||||||
else
|
|
||||||
return transcendence(i)
|
|
||||||
} else if (
|
} else if (
|
||||||
props.special && props.type === 'character' && i == 3 ||
|
(props.special && props.type === "character" && i == 3) ||
|
||||||
props.type === 'character' && i == 4 ||
|
(props.type === "character" && i == 4) ||
|
||||||
props.type !== 'character' && i > 2) {
|
(props.type !== "character" && i > 2)
|
||||||
|
) {
|
||||||
return flb(i)
|
return flb(i)
|
||||||
} else {
|
} else {
|
||||||
return mlb(i)
|
return mlb(i)
|
||||||
}
|
}
|
||||||
})
|
})}
|
||||||
}
|
|
||||||
</ul>
|
</ul>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue