-
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.
Resolves #495 Added new assistant pop-up, which is triggered when user opens the realm modal for the first time ![image](https://github.com/tahowallet/dapp/assets/73061939/e9b6aeaa-4862-4825-9a3c-dbe527c21ae7)
- Loading branch information
Showing
7 changed files
with
68 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export const LOCAL_STORAGE_ASSISTANT = "taho.assistant" | ||
export const LOCAL_STORAGE_WALLET = "onboarded_wallet" | ||
export const LOCAL_STORAGE_VISITED_REALM = "taho.visitedRealm" | ||
export const LOCAL_STORAGE_BRAVE = "taho.brave" |
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,47 @@ | ||
import React from "react" | ||
import { useAssistant, useLocalStorageChange } from "shared/hooks" | ||
import { LOCAL_STORAGE_VISITED_REALM } from "shared/constants" | ||
import AssistantContent from "." | ||
|
||
export default function AssistantFirstRealm() { | ||
const { updateAssistant, assistantVisible } = useAssistant() | ||
const { updateStorage } = useLocalStorageChange<boolean>( | ||
LOCAL_STORAGE_VISITED_REALM | ||
) | ||
|
||
const closeAssistant = () => { | ||
updateStorage(true) | ||
updateAssistant({ visible: false, type: "default" }) | ||
} | ||
|
||
return ( | ||
<> | ||
<AssistantContent | ||
isVisible={assistantVisible("first-realm")} | ||
close={closeAssistant} | ||
> | ||
<div className="header">How to choose a realm?</div> | ||
<p className="paragraph"> | ||
Rewards are shared based on population and Quest completion. | ||
</p> | ||
<p className="paragraph"> | ||
So choose your realm based on quests you want and can complete. | ||
</p> | ||
<p className="paragraph" style={{ marginBottom: 0 }}> | ||
But also be mind-full, that a popular realm might yield less | ||
individual rewards | ||
</p> | ||
</AssistantContent> | ||
<style jsx>{` | ||
.header { | ||
font: var(--text-h1); | ||
margin-bottom: 8px; | ||
} | ||
.paragraph { | ||
color: var(--secondary-s1-80); | ||
margin-bottom: 24px; | ||
} | ||
`}</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
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