-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ref #875 Ref #876 ## What has been done - Added "Beta has ended" modal on top of the map - Added "Portal is closed" modal on the onboarding page - Set flags to prevent users from entering the map, when portal is closed - Automatically clear onboarded wallet when portal is closed ## What is missing - Link to claim Galxe NFT - Endpoint for "Sign up" form ## Testing - [x] Set `IS_BETA_CLOSED` flag to `true` - [x] "Beta has ended" modal is on top of the map - [x] Modal can be closed - [x] Set `IS_PORTAL_CLOSED` flag to `true` - [x] Onboarded wallet is cleared from `localStorage` - [x] "Portal is closed" modal is on the onboarding page - [x] Population count is not visible - [x] Is it not possible to connect the wallet ![Zrzut ekranu 2023-12-12 o 09 35 26](https://github.com/tahowallet/dapp/assets/73061939/0b01bcb6-4aad-4ee7-9e6a-274cfdc0027b) ![Zrzut ekranu 2023-12-12 o 09 34 53](https://github.com/tahowallet/dapp/assets/73061939/5d1f8ca7-80ba-4b14-9957-4a3e739b4bd5)
- Loading branch information
Showing
16 changed files
with
286 additions
and
34 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
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,25 @@ | ||
import React from "react" | ||
import Button from "shared/components/Interface/Button" | ||
import closeIcon from "shared/assets/icons/s/close-black.svg" | ||
|
||
export default function BetaEndCloseButton({ | ||
onClose, | ||
}: { | ||
onClose: () => void | ||
}) { | ||
return ( | ||
<Button | ||
type="close" | ||
iconSrc={closeIcon} | ||
onClick={onClose} | ||
style={{ | ||
padding: 12, | ||
position: "absolute", | ||
top: -20, | ||
right: -20, | ||
filter: | ||
"drop-shadow(0px 2px 4px rgba(7, 17, 17, 0.34)) drop-shadow(0px 6px 8px rgba(7, 17, 17, 0.24)) drop-shadow(0px 16px 16px rgba(7, 17, 17, 0.30))", | ||
}} | ||
/> | ||
) | ||
} |
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,44 @@ | ||
import React from "react" | ||
import Button from "shared/components/Interface/Button" | ||
import { LINKS } from "shared/constants" | ||
|
||
export default function ClaimYourNFT() { | ||
return ( | ||
<> | ||
<div | ||
className="modal_actions_column column" | ||
style={{ alignItems: "end", textAlign: "right" }} | ||
> | ||
<h2 className="modal_actions_header">Claim your NFT</h2> | ||
<p className="modal_actions_description"> | ||
Participated in the beta? See if you are | ||
<br /> | ||
eligible to claim the NFT awards. | ||
</p> | ||
<Button | ||
onClick={(e) => { | ||
e.preventDefault() | ||
window.open(LINKS.GALXE_NFT, "_blank") | ||
}} | ||
> | ||
Check eligibility on Galxe | ||
</Button> | ||
</div> | ||
<style jsx>{` | ||
.modal_actions_column { | ||
width: 50%; | ||
padding-inline: 47px; | ||
} | ||
.modal_actions_header { | ||
font-size: 28px; | ||
font-weight: 500; | ||
line-height: 32px; | ||
margin-bottom: 10px; | ||
} | ||
.modal_actions_description { | ||
margin-bottom: 18px; | ||
} | ||
`}</style> | ||
</> | ||
) | ||
} |
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,33 @@ | ||
import React from "react" | ||
import GetUpdatesForm from "./GetUpdatesForm" | ||
|
||
export default function GetUpdates() { | ||
return ( | ||
<> | ||
<div className="modal_actions_column"> | ||
<h2 className="modal_actions_header">Get Updates</h2> | ||
<p className="modal_actions_description"> | ||
Sign up for updates bellow to learn | ||
<br /> | ||
when Season 1 is starting | ||
</p>{" "} | ||
<GetUpdatesForm /> | ||
</div> | ||
<style jsx>{` | ||
.modal_actions_column { | ||
width: 50%; | ||
padding-inline: 47px; | ||
} | ||
.modal_actions_header { | ||
font-size: 28px; | ||
font-weight: 500; | ||
line-height: 32px; | ||
margin-bottom: 10px; | ||
} | ||
.modal_actions_description { | ||
margin-bottom: 18px; | ||
} | ||
`}</style> | ||
</> | ||
) | ||
} |
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,46 @@ | ||
import React, { FormEvent, useState } from "react" | ||
import Button from "shared/components/Interface/Button" | ||
|
||
export default function GetUpdatesForm() { | ||
const [emailAddress, setEmailAddress] = useState("") | ||
|
||
const formSubmitHandler = (e: FormEvent) => { | ||
e.preventDefault() | ||
|
||
// TODO: logic for sending form | ||
} | ||
|
||
return ( | ||
<> | ||
<form className="row_center" onSubmit={formSubmitHandler}> | ||
<input | ||
tabIndex={0} | ||
placeholder="Email address" | ||
value={emailAddress} | ||
onChange={(e) => setEmailAddress(e.target.value)} | ||
className="modal_actions_input" | ||
/> | ||
<Button buttonType="submit" style={{ transform: "translateX(-20px)" }}> | ||
Sign up | ||
</Button> | ||
</form> | ||
<style jsx>{` | ||
.modal_actions_input { | ||
font-size: 16px; | ||
line-height: 24px; | ||
background: var(--primary-p1-100); | ||
padding: 12px 16px; | ||
outline: none; | ||
border-radius: 4px; | ||
border: 1.5px solid var(--green-60); | ||
font-family: var(--sans); | ||
color: var(--secondary-s1-100); | ||
} | ||
modal_actions_input:focus, | ||
modal_actions_input:active { | ||
border-color: var(--secondary-s1-100); | ||
} | ||
`}</style> | ||
</> | ||
) | ||
} |
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,75 @@ | ||
import React, { ReactNode } from "react" | ||
import Modal from "shared/components/Dialogs/Modal" | ||
import GetUpdates from "./GetUpdates" | ||
import ClaimYourNFT from "./ClaimYourNFT" | ||
import BetaEndCloseButton from "./BetaEndCloseButton" | ||
|
||
type BetaEndModalProps = { | ||
header: ReactNode | ||
children: ReactNode | ||
onClose?: () => void | ||
} | ||
|
||
export default function BetaEndModal({ | ||
header, | ||
children, | ||
onClose, | ||
}: BetaEndModalProps) { | ||
return ( | ||
<> | ||
<Modal.ScrollableContainer | ||
type="island-without-overlay" | ||
topSpacing="150px" | ||
> | ||
<Modal.Content style={{ display: "flex", justifyContent: "center" }}> | ||
<div style={{ width: 860, position: "relative" }}> | ||
<div className="modal_header_container"> | ||
<h1 className="modal_header">{header}</h1> | ||
<div style={{ paddingInline: 20 }}>{children}</div> | ||
</div> | ||
<div className="modal_actions row"> | ||
<ClaimYourNFT /> | ||
<GetUpdates /> | ||
</div> | ||
{onClose && <BetaEndCloseButton onClose={onClose} />} | ||
</div> | ||
</Modal.Content> | ||
</Modal.ScrollableContainer> | ||
<style jsx>{` | ||
.modal_header_container { | ||
background: var(--background-gradient); | ||
backdrop-filter: blur(26px); | ||
text-align: center; | ||
padding: 49px 63px 40px; | ||
border-radius: 16px 16px 0 0; | ||
} | ||
.modal_header { | ||
font-family: var(--serif); | ||
font-size: 52px; | ||
font-weight: 500; | ||
line-height: 42px; | ||
letter-spacing: 1.04px; | ||
margin-bottom: 32px; | ||
} | ||
.modal_actions { | ||
background: var(--primary-p1-100); | ||
padding: 36px 0 40px; | ||
width: 100%; | ||
border-radius: 0 0 16px 16px; | ||
position: relative; | ||
} | ||
.modal_actions::after { | ||
content: ""; | ||
opacity: 0.4; | ||
background: #557473; | ||
width: 1px; | ||
height: 152px; | ||
position: absolute; | ||
left: 50%; | ||
top: 45px; | ||
transform: translateX(-50%); | ||
} | ||
`}</style> | ||
</> | ||
) | ||
} |
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
Oops, something went wrong.