Skip to content

Commit

Permalink
Fix build issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ikprk committed Jul 16, 2024
1 parent d30e064 commit ba7fae0
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export const HotCreatorTokens = ({ interval, tableTitle }: { interval: number; t
periodDays: interval,
limit: 10,
where: {
id_in: topInteractedTokens?.getTopInteractedEnities.map((entity) => entity.entityId),
id_in: topInteractedTokens?.getTopInteractedEntities.map((entity) => entity.entityId),
},
},
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const CrtCarouselDetails = ({
currentSale,
channel,
} = crt
const { video } = trailerVideo[0] ?? {}
const { video } = trailerVideo ?? {}
const thumbnailUrls: string[] = video?.thumbnailPhoto?.resolvedUrls ?? []
const mediaUrls: string[] = video?.media?.resolvedUrls ?? []
const isLoading = !thumbnailUrls || !mediaUrls
Expand Down Expand Up @@ -127,7 +127,7 @@ export const CrtCarouselDetails = ({

return (
<VideoCardWrapper
videoId={video?.id}
videoId={video?.id ?? ''}
active={active}
goNextSlide={slideNext}
mediaUrls={mediaUrls}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,14 @@ const DashboardTokenProgress = ({ token }: Pick<CrtDashboardMainTabProps, 'token
: ''

const currentMemberStep = useMemo((): number => {
if (!(token.description || token.benefits.length || token.trailerVideo.length)) return 1
if (!(token.description || token.benefits.length || token.trailerVideo)) return 1
if (!token.ammCurves.length && !token.sales.length) return 2
if (!token.revenueShares.length) return 3
return 4
}, [
token.description,
token.benefits.length,
token.trailerVideo.length,
token.trailerVideo,
token.ammCurves.length,
token.sales.length,
token.revenueShares.length,
Expand Down Expand Up @@ -234,7 +234,7 @@ const DashboardTokenProgress = ({ token }: Pick<CrtDashboardMainTabProps, 'token
let isFinished = idx === 0

if (idx === 1) {
isFinished = !!(token.description || token.benefits.length || token.trailerVideo.length)
isFinished = !!(token.description || token.benefits.length || token.trailerVideo)
}

if (idx === 2) {
Expand All @@ -256,7 +256,7 @@ const DashboardTokenProgress = ({ token }: Pick<CrtDashboardMainTabProps, 'token
token.description,
token.revenueShares.length,
token.sales.length,
token.trailerVideo.length,
token.trailerVideo,
]
)
const numberOfFinishedSteps = steps.filter((step) => step.finished).length
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export const CrtTokenEditView = () => {
useEffect(() => {
if (tokenData?.creatorTokenById) {
form.reset({
videoId: tokenData?.creatorTokenById?.trailerVideo[0]?.video.id,
videoId: tokenData?.creatorTokenById?.trailerVideo?.video.id,
benefits: tokenData?.creatorTokenById?.benefits,
about: tokenData?.creatorTokenById?.description ?? '',
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export const ChannelToken = ({ tokenId, memberId, cumulativeRevenue }: ChannelTo
<TokenDetails
about={token?.description ?? ''}
benefits={token?.benefits}
videoId={token?.trailerVideo?.[0]?.video.id}
videoId={token?.trailerVideo?.video.id}
/>
)}
</GridItem>
Expand Down

0 comments on commit ba7fae0

Please sign in to comment.