-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Scout game referral * Add baseUrl * Revert info page icon * Missing telegram API * Update catching errors in the page * Update session in welcome * Starterpack * WIP connect to new contract * Add starter pack overlay * Add onboarding workflows * Cleanup registration and loading * Update fetcher methods * Fix type errors * Contract address * Working display for starter pack * Use nft type and fix type errors * Cleanup form * Fix NFT purchase * Add builder scouted events from starter pack to auto-resolution * Hide starter pack screen if user has already bought the max * Include starter pack in calculation * Add test coverage for scout point division * Fix tests * Delete stubs * Cleanup code * Cleanup * Ensure bio displays * Fix onboarding page * Cleanup starterpack UI * Fix builders carousel and UI * Cleanup tests * Fix the scout info page * Fix unit tests * Fix E2E test * More logging * Bump core * Move to starter pack logic * Fix seeder script * Fix types * Bump core * Fix types * Fix types * Bump core * Fix the types * fix image hostname used for background images in nfts * fix permissions tag * Fix key for environment value * Dont return NFT with 0 purchases * Cleanup PR review * Cleanup carousel * Fix up carousel formatting * Fix the paths for AWS * Cleanup * Bump core --------- Co-authored-by: Valentin L <[email protected]> Co-authored-by: mattcasey <[email protected]>
- Loading branch information
1 parent
f2773e1
commit 36c999e
Showing
86 changed files
with
2,340 additions
and
232 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { log } from '@charmverse/core/log'; | ||
import { BuilderNftType } from '@charmverse/core/prisma-client'; | ||
import { currentSeason } from '@packages/scoutgame/dates'; | ||
import { getBuildersByFid } from '@packages/scoutgame/social/getBuildersByFid'; | ||
import type { Metadata } from 'next'; | ||
import { redirect } from 'next/navigation'; | ||
|
||
import { ScoutInfoPage } from 'components/welcome/scout-info/ScoutInfoPage'; | ||
|
||
export const dynamic = 'force-dynamic'; | ||
|
||
export const metadata: Metadata = { | ||
other: { | ||
robots: 'noindex' | ||
}, | ||
title: 'Welcome' | ||
}; | ||
|
||
export default async function ScoutInfo() { | ||
const starterPackBuilder = await getBuildersByFid({ | ||
// piesrtasty | ||
fids: [547807], | ||
season: currentSeason, | ||
nftType: BuilderNftType.starter_pack, | ||
limit: 1 | ||
}); | ||
|
||
if (!starterPackBuilder.builders[0]) { | ||
log.warn('No starter pack builder found, redirecting to builders you know'); | ||
redirect('/builders-you-know'); | ||
} | ||
|
||
return <ScoutInfoPage builder={starterPackBuilder.builders[0]} />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
apps/scoutgame/components/scout/components/StarterPackInfo.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { Box, Typography } from '@mui/material'; | ||
|
||
export function StarterPackInfo({ builders = 3 }: { builders?: number }) { | ||
return ( | ||
<Box> | ||
<Typography variant='h4' color='secondary' fontWeight={600} textAlign='center'> | ||
Scout your Starter Pack | ||
</Typography> | ||
<Typography variant='h5' textAlign='center'> | ||
Scout up to {builders} Builders in this Starter Set <br /> | ||
Starter Cards at 20 point (up to 95% off) | ||
</Typography> | ||
<Typography>* Starter Cards earn 1/10th the points of Season Cards.</Typography> | ||
</Box> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
apps/scoutgame/components/welcome/scout-info/ScoutInfoContent.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
'use client'; | ||
|
||
import { Box, Button, Typography } from '@mui/material'; | ||
import type { BuilderInfo } from '@packages/scoutgame/builders/interfaces'; | ||
import { BuilderCard } from '@packages/scoutgame-ui/components/common/Card/BuilderCard/BuilderCard'; | ||
import { useMdScreen } from '@packages/scoutgame-ui/hooks/useMediaScreens'; | ||
import Link from 'next/link'; | ||
import React from 'react'; | ||
|
||
export function ScoutInfoContent({ builder }: { builder: BuilderInfo }) { | ||
const isMdScreen = useMdScreen(); | ||
const iconSize = isMdScreen ? 24 : 18; | ||
return ( | ||
<> | ||
<Typography color='secondary' textAlign='center' width='100%' fontWeight={700} variant='h5'> | ||
Last Step! | ||
</Typography> | ||
<Box> | ||
<Box my={2}> | ||
<BuilderCard builder={builder} disableProfileUrl /> | ||
</Box> | ||
<Typography my={2}> | ||
You score points by collecting the NFTs of Builders. You can Scout your first 3 builders for 95% off their | ||
normal price. | ||
</Typography> | ||
</Box> | ||
<Button | ||
LinkComponent={Link} | ||
variant='contained' | ||
href='/builders-you-know' | ||
data-test='start-scouting-button' | ||
sx={{ margin: '8px auto', display: 'flex', width: 'fit-content' }} | ||
> | ||
Start Scouting | ||
</Button> | ||
</> | ||
); | ||
} |
18 changes: 18 additions & 0 deletions
18
apps/scoutgame/components/welcome/scout-info/ScoutInfoPage.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import type { BuilderInfo } from '@packages/scoutgame/builders/interfaces'; | ||
|
||
import { SinglePageLayout } from 'components/common/Layout'; | ||
import { SinglePageWrapper } from 'components/common/SinglePageWrapper'; | ||
import { InfoBackgroundImage } from 'components/layout/InfoBackgroundImage'; | ||
|
||
import { ScoutInfoContent } from './ScoutInfoContent'; | ||
|
||
export function ScoutInfoPage({ builder }: { builder: BuilderInfo }) { | ||
return ( | ||
<SinglePageLayout> | ||
<InfoBackgroundImage /> | ||
<SinglePageWrapper bgcolor='background.default' maxWidth='350px' height='initial'> | ||
<ScoutInfoContent builder={builder} /> | ||
</SinglePageWrapper> | ||
</SinglePageLayout> | ||
); | ||
} |
Oops, something went wrong.