Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions components/Connected.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ const Connected: FC = () => {
metaplex
.candyMachines()
.findByAddress({
address: new PublicKey("2AVdQdNsR1tgehsWoUXX98tBuiHupciJGq2mgGxpgdeC"),
address: new PublicKey(
process.env.NEXT_PUBLIC_CANDY_MACHINE_ADDRESS ?? ""
),
})
.run()
.then((candyMachine) => {
Expand Down Expand Up @@ -68,13 +70,15 @@ const Connected: FC = () => {
<Container>
<VStack spacing={8}>
<Heading color="white" as='h1' size='2xl' noOfLines={1} textAlign='center'>
Welcome Wonderer.
Welcome Nomad.
</Heading>

<Text color="bodyText" fontSize="Xl" textAlign="center">
Each Nomad is randomly generated and can be staked to receive
<Text as='b'> $TRVL</Text>. Use your <Text as="b"> $TRVL</Text> to
upgrade your wonderlust Nomad and receive perks within the community!
Each NoMad is randomly generated and can be staked to receive
<Text as='b'> $TRVL</Text>.
<br />
<br /> Use your <Text as="b"> $TRVL</Text> to enhance your NoMadic experience
<br/> and unlock exclusive experiences!
</Text>
</VStack>
</Container>
Expand Down
22 changes: 22 additions & 0 deletions components/ItemBox.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { Center } from "@chakra-ui/react"
import { ReactNode } from "react"


export const ItemBox = ({
children,
bgColor,
}: {
children: ReactNode,
bgColor?: string
}) => {
return(
<Center
height="120px"
width="120px"
bgColor={bgColor || "containerBg"}
borderRadius="10px"
>
{children}
</Center>
)
}
17 changes: 11 additions & 6 deletions components/MainLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ import { useWallet } from '@solana/wallet-adapter-react'

const MainLayout: FC<{ children: ReactNode }> = ({ children}) => {
const { connected } = useWallet()

return (
<div className={styles.container}>
<Head>
<title>CoinPad</title>
<meta name="The NFT Collection for Coinpad" />
<link rel="icon" href="favicon.ico" />
<title>WAGMI.Travel</title>
<meta name="The NFT Collection for WAGMI.travel" />
<link rel="icon" href="/693-svg.svg" />
</Head>

<Box
Expand All @@ -27,17 +28,21 @@ const MainLayout: FC<{ children: ReactNode }> = ({ children}) => {
<Stack w='full' h='calc(100vh)' justify='top'>
<NavBar />

<Spacer>

<Center>{ children } </Center>

</Spacer>

<Center>
<Box marginBottom={4} color="white">
{/*<a
href="https//twitter.com/_buildspace"
<a
href="https//twitter.com/0xblockfather"
target="_blank"
rel="noopener noreferrer"
>
Built by @BlockFather
</a>*/}
</a>
</Box>
</Center>
</Stack>
Expand Down
58 changes: 58 additions & 0 deletions components/StakeOptionsDisplay.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import{ VStack, Text, Button } from "@chakra-ui/react"
import { useCallback } from "react"

export const StakeOptionsDisplay = ({
isStaking,
daysStaked,
totalEarned,
claimable
}: {
isStaking: boolean,
daysStaked: number,
totalEarned: number,
claimable: number
}) => {
const handleStake = useCallback(() => {}, [])

const handleUnstake = useCallback(() => {}, [])

const handleClaim = useCallback(() => {}, [])

return (
<VStack
bgColor="containerBg"
borderRadius="20px"
padding="20px 40px"
spacing={5}
>
<Text
bgColor="containerBgSecondary"
padding="4px 8px"
borderRadius="20px"
color="bodyText"
as="b"
fontSize="sm"
>
{isStaking ? `STAKING ${daysStaked} DAY${daysStaked === 1 ? "" : "S"}` : "READY TO STAKE"}
</Text>
<VStack spacing={-1}>
<Text color="white" as="b" fontSize="4xl">
{isStaking ? `${totalEarned} $TRVL` : "0 $TRVL"}
</Text>
<Text color="bodyText">
{isStaking ? `${claimable} $TRVL earned` : "earn $TRVL by staking"}
</Text>
</VStack>
<Button
onClick={isStaking ? handleClaim : handleStake}
bgColor="buttonGreen"
width="200px"
>
<Text as="b">
{isStaking ? "claim $TRVL" : "stake NoMad"}
</Text>
</Button>
{isStaking ? <Button onClick={handleUnstake}>unstake</Button> : null}
</VStack>
)
}
Loading