diff --git a/src/hooks/useJbProject.tsx b/src/hooks/useJbProject.tsx index cfbc120f..e498a634 100644 --- a/src/hooks/useJbProject.tsx +++ b/src/hooks/useJbProject.tsx @@ -1,4 +1,5 @@ import { useJBProjectMetadata } from '@/contexts/ProjectMetadata' +import { DREAM_DAO } from '@/lib/backend/static/projects' import { useProjectsQuery } from '@/lib/graphql/hooks' import { Ether, @@ -90,6 +91,13 @@ export const useJbProject = ({ ]) const softTarget = useMemo(() => { + // TODO: Remove this once DREAM DAO has rectified metadata + if (projectId === DREAM_DAO) { + return { + amount: Ether.parse('50000', 18).val, + currency: JB_CURRENCIES.USD, + } + } if (metadata.softTargetAmount) { return { amount: Ether.parse(metadata.softTargetAmount, 0).val, @@ -102,7 +110,7 @@ export const useJbProject = ({ amount: 0n, currency: JB_CURRENCIES.USD, } - }, [metadata.softTargetAmount, metadata.softTargetCurrency]) + }, [metadata.softTargetAmount, metadata.softTargetCurrency, projectId]) const endDate = useMemo(() => { if (!fundingCycleData.data) return undefined @@ -114,9 +122,19 @@ export const useJbProject = ({ return new Date((start + duration) * 1000) }, [fundingCycleData.data]) + const introVideoUrl = useMemo(() => { + // TODO: Remove this once DREAM DAO has rectified metadata + if (projectId === DREAM_DAO) { + return 'https://www.youtube.com/watch?v=r603LXdSQjY' + } + + return metadata.introVideoUrl + }, [metadata.introVideoUrl, projectId]) + return { ...(pick(_graphqlProject, ['handle', 'contributorsCount']) ?? {}), ...metadata, + introVideoUrl, softTarget, endDate, socialLinks, diff --git a/src/lib/backend/static/projects.ts b/src/lib/backend/static/projects.ts index 135651ee..605e14a0 100644 --- a/src/lib/backend/static/projects.ts +++ b/src/lib/backend/static/projects.ts @@ -16,14 +16,14 @@ interface ProjectPageProps { projectId: number } -const DREAM_DAO = 600 +export const DREAM_DAO = 600n const ALLOWLIST_PROJECT_IDS = [ /** * DREAM DAO is required for hard code due to a bug in juicebox that * accidentally wiped out its domain metadata. */ - DREAM_DAO, + Number(DREAM_DAO), ] const getStaticPaths: GetStaticPaths = async () => {