-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #424 from starknet-id/feat/add-referral-modal
feat: add registration modal
- Loading branch information
Showing
2 changed files
with
70 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
import React, { FunctionComponent } from "react"; | ||
import Lottie from "lottie-react"; | ||
import ModalMessage from "../UI/modalMessage"; | ||
import verifiedLottie from "../../public/visuals/verifiedLottie.json"; | ||
import Button from "./button"; | ||
|
||
type RegisterConfirmationModalProps = { | ||
txHash?: string; | ||
isTxModalOpen: boolean; | ||
closeModal: () => void; | ||
}; | ||
|
||
const RegisterConfirmationModal: FunctionComponent< | ||
RegisterConfirmationModalProps | ||
> = ({ txHash, isTxModalOpen, closeModal }) => { | ||
return ( | ||
<ModalMessage | ||
open={isTxModalOpen} | ||
title={"Thanks, It's now time to earn crypto !"} | ||
closeModal={() => closeModal()} | ||
message={ | ||
<div className="flex items-center justify-center text-center py-5 gap-2 flex-wrap lg:flex-nowrap"> | ||
<div className="flex flex-col"> | ||
<Lottie | ||
className="w-52" | ||
animationData={verifiedLottie} | ||
loop={false} | ||
/>{" "} | ||
<p | ||
className="text-xs underline cursor-pointer" | ||
onClick={() => | ||
window.open( | ||
`https://${ | ||
process.env.NEXT_PUBLIC_IS_TESTNET === "true" | ||
? "testnet." | ||
: "" | ||
}starkscan.co/tx/${txHash}` | ||
) | ||
} | ||
> | ||
View transaction on explorer | ||
</p> | ||
</div> | ||
<div className="flex flex-col "> | ||
<p className="text-justify"> | ||
Refer your friends to Starknet ID and earn{" "} | ||
<strong>ETH or STRK</strong> ! Each sale made with your referral | ||
link will permit you to earn up to 8$ worth of crypto. | ||
</p> | ||
<div className="mt-5"> | ||
<Button | ||
onClick={() => | ||
window.open( | ||
"https://www.starknet.id/affiliates/individual-program" | ||
) | ||
} | ||
> | ||
Start earning crypto | ||
</Button> | ||
</div> | ||
</div> | ||
</div> | ||
} | ||
/> | ||
); | ||
}; | ||
|
||
export default RegisterConfirmationModal; |
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
7447f4d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
goerli-app-starknet-id – ./
app-starknet-id.vercel.app
goerli-app-starknet-id-git-testnet-starknetid.vercel.app
goerli-app-starknet-id-starknetid.vercel.app
goerli.indexer.starknet.id
goerli.app.starknet.id