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
|
||||
displayUser?: boolean | false
|
||||
onClick: (shortcode: string) => void
|
||||
onSave: (partyId: string, favorited: boolean) => void
|
||||
onSave?: (partyId: string, favorited: boolean) => void
|
||||
}
|
||||
|
||||
const GridRep = (props: Props) => {
|
||||
|
|
@ -75,7 +75,8 @@ const GridRep = (props: Props) => {
|
|||
}
|
||||
|
||||
function sendSaveData() {
|
||||
props.onSave(props.id, props.favorited)
|
||||
if (props.onSave)
|
||||
props.onSave(props.id, props.favorited)
|
||||
}
|
||||
|
||||
const userImage = () => {
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ const RaidDropdown = React.forwardRef<HTMLSelectElement, Props>(function useFiel
|
|||
|
||||
useEffect(() => {
|
||||
fetchRaids()
|
||||
}, [])
|
||||
}, [fetchRaids])
|
||||
|
||||
function fetchRaids() {
|
||||
api.endpoints.raids.getAll(headers)
|
||||
|
|
|
|||
|
|
@ -72,11 +72,13 @@ const ProfileRoute: React.FC = () => {
|
|||
{
|
||||
parties.map((party, i) => {
|
||||
return <GridRep
|
||||
id={party.id}
|
||||
shortcode={party.shortcode}
|
||||
name={party.name}
|
||||
createdAt={new Date(party.created_at)}
|
||||
raid={party.raid}
|
||||
grid={party.weapons}
|
||||
favorited={party.favorited}
|
||||
key={`party-${i}`}
|
||||
onClick={goTo}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ const SavedRoute: React.FC = () => {
|
|||
useEffect(() => {
|
||||
console.log(`Fetching favorite teams...`)
|
||||
fetchTeams()
|
||||
}, [])
|
||||
}, [fetchTeams])
|
||||
|
||||
useEffect(() => {
|
||||
window.addEventListener("scroll", handleScroll)
|
||||
|
|
@ -145,7 +145,7 @@ const SavedRoute: React.FC = () => {
|
|||
function renderNoGrids() {
|
||||
return (
|
||||
<div id="NotFound">
|
||||
<h2>You haven't saved any teams yet</h2>
|
||||
<h2>You haven't saved any teams yet</h2>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ const TeamsRoute: React.FC = () => {
|
|||
useEffect(() => {
|
||||
console.log(`Fetching teams...`)
|
||||
fetchTeams()
|
||||
}, [])
|
||||
}, [fetchTeams])
|
||||
|
||||
useEffect(() => {
|
||||
window.addEventListener("scroll", handleScroll)
|
||||
|
|
|
|||
Loading…
Reference in a new issue