Fix (some) warnings and errors
I always forget to `npm run build` before pushing a PR
This commit is contained in:
parent
65d46f8f96
commit
ad1472dfbb
5 changed files with 9 additions and 6 deletions
|
|
@ -22,7 +22,7 @@ interface Props {
|
||||||
createdAt: Date
|
createdAt: Date
|
||||||
displayUser?: boolean | false
|
displayUser?: boolean | false
|
||||||
onClick: (shortcode: string) => void
|
onClick: (shortcode: string) => void
|
||||||
onSave: (partyId: string, favorited: boolean) => void
|
onSave?: (partyId: string, favorited: boolean) => void
|
||||||
}
|
}
|
||||||
|
|
||||||
const GridRep = (props: Props) => {
|
const GridRep = (props: Props) => {
|
||||||
|
|
@ -75,7 +75,8 @@ const GridRep = (props: Props) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
function sendSaveData() {
|
function sendSaveData() {
|
||||||
props.onSave(props.id, props.favorited)
|
if (props.onSave)
|
||||||
|
props.onSave(props.id, props.favorited)
|
||||||
}
|
}
|
||||||
|
|
||||||
const userImage = () => {
|
const userImage = () => {
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ const RaidDropdown = React.forwardRef<HTMLSelectElement, Props>(function useFiel
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
fetchRaids()
|
fetchRaids()
|
||||||
}, [])
|
}, [fetchRaids])
|
||||||
|
|
||||||
function fetchRaids() {
|
function fetchRaids() {
|
||||||
api.endpoints.raids.getAll(headers)
|
api.endpoints.raids.getAll(headers)
|
||||||
|
|
|
||||||
|
|
@ -72,11 +72,13 @@ const ProfileRoute: React.FC = () => {
|
||||||
{
|
{
|
||||||
parties.map((party, i) => {
|
parties.map((party, i) => {
|
||||||
return <GridRep
|
return <GridRep
|
||||||
|
id={party.id}
|
||||||
shortcode={party.shortcode}
|
shortcode={party.shortcode}
|
||||||
name={party.name}
|
name={party.name}
|
||||||
createdAt={new Date(party.created_at)}
|
createdAt={new Date(party.created_at)}
|
||||||
raid={party.raid}
|
raid={party.raid}
|
||||||
grid={party.weapons}
|
grid={party.weapons}
|
||||||
|
favorited={party.favorited}
|
||||||
key={`party-${i}`}
|
key={`party-${i}`}
|
||||||
onClick={goTo}
|
onClick={goTo}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ const SavedRoute: React.FC = () => {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
console.log(`Fetching favorite teams...`)
|
console.log(`Fetching favorite teams...`)
|
||||||
fetchTeams()
|
fetchTeams()
|
||||||
}, [])
|
}, [fetchTeams])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
window.addEventListener("scroll", handleScroll)
|
window.addEventListener("scroll", handleScroll)
|
||||||
|
|
@ -145,7 +145,7 @@ const SavedRoute: React.FC = () => {
|
||||||
function renderNoGrids() {
|
function renderNoGrids() {
|
||||||
return (
|
return (
|
||||||
<div id="NotFound">
|
<div id="NotFound">
|
||||||
<h2>You haven't saved any teams yet</h2>
|
<h2>You haven't saved any teams yet</h2>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ const TeamsRoute: React.FC = () => {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
console.log(`Fetching teams...`)
|
console.log(`Fetching teams...`)
|
||||||
fetchTeams()
|
fetchTeams()
|
||||||
}, [])
|
}, [fetchTeams])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
window.addEventListener("scroll", handleScroll)
|
window.addEventListener("scroll", handleScroll)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue