Skip to content

Commit

Permalink
fix: types
Browse files Browse the repository at this point in the history
  • Loading branch information
flavioislima committed Dec 13, 2024
1 parent c853578 commit a8e8273
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 4 additions & 1 deletion src/common/typedefs/ipcBridge.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,10 @@ interface HyperPlayAsyncIPCFunctions {
getQuests: (projectId?: string) => Promise<Quest[]>
getQuest: (questId: number) => Promise<Quest>
getUserPlayStreak: (questId: number) => Promise<UserPlayStreak>
getSteamGameMetadata: (gameId: number) => Promise<unknown>
getSteamGameMetadata: (gameId: number) => Promise<{
name?: string
capsule_image?: string
}>
confirmRewardClaim: (params: ConfirmClaimParams) => Promise<void>
getHyperPlayListings: () => Promise<Record<string, HyperPlayRelease>>
getQuestRewardSignature: (
Expand Down
8 changes: 5 additions & 3 deletions src/frontend/components/UI/QuestDetails/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { useTranslation } from 'react-i18next'
import { useAccount } from 'wagmi'
import { useSyncPlayStreakWithExternalSource } from 'frontend/hooks/useSyncPlayStreakWithExternalSource'
import extensionState from 'frontend/state/ExtensionState'
import { PossibleMetricPayloads } from 'backend/metrics/types'

/**
* Don't delete this comment block since it's used for translation parsing for keys that are on the quests-ui library.
Expand Down Expand Up @@ -63,7 +64,7 @@ export default function QuestDetails({
questId,
className,
isQuestsPage,
onPlayClick
onPlayClick = () => {}
}: {
questId: number | null
className?: string
Expand Down Expand Up @@ -95,7 +96,6 @@ export default function QuestDetails({

return (
<QuestDetailsWrapper
// @ts-expect-error - see: https://github.com/qmhc/vite-plugin-dts/issues/330
onRewardClaimed={(reward) =>
claimedRewardToastState.showClaimedReward(reward)
}
Expand Down Expand Up @@ -124,7 +124,9 @@ export default function QuestDetails({
},
questsOverlayClaimCtaEnabled: flags.questsOverlayClaimCtaEnabled
}}
trackEvent={window.api.trackEvent}
trackEvent={async (eventPayload) =>
window.api.trackEvent(eventPayload as PossibleMetricPayloads)
}
signInWithSteamAccount={() => window.api.signInWithProvider('steam')}
openDiscordLink={window.api.openDiscordLink}
selectedQuestId={questId}
Expand Down

0 comments on commit a8e8273

Please sign in to comment.