feat: user can access FAQs in the 'Guide' tab

This commit is contained in:
Pierre DM
2022-07-08 16:33:19 +02:00
parent a73c7082e3
commit 3ae1b43fbf
4 changed files with 38 additions and 4 deletions

View File

@@ -0,0 +1,16 @@
import { FunctionalComponent, h } from "preact";
import { faqStyles } from "../helpers/theme";
import { QuestionAnswerProps } from "../typings/typings";
export const QuestionAnswer: FunctionalComponent<QuestionAnswerProps> = (props) => {
return (
<div style={{ marginTop: "8px", marginBottom: "4px" }}>
<div style={faqStyles.question}>
{props.question}
</div>
<div>
{props.answer}
</div>
</div>
);
};

View File

@@ -65,4 +65,11 @@ export const myPlanetstyles = {
empty: {
color: "#838383",
},
};
export const faqStyles = {
question: {
textDecoration: "underline",
}
};

View File

@@ -111,4 +111,9 @@ type ListingItemProps = {
actionButtonTheme: string;
onClickOrders: () => void;
onClickAction: () => void;
};
type QuestionAnswerProps = {
question: string;
answer: string;
};

View File

@@ -1,9 +1,15 @@
import { h } from "preact";
import { QuestionAnswer } from "../components/QuestionAnswer";
export function GuideView() {
export function GuideView () {
return (
<div>
Here are some FAQs
<QuestionAnswer question="What is this?" answer="A market to sell the planets you discovered, without divulging their coordinates up until the sale is carried out." />
<QuestionAnswer question="Can other players see the coordinates of the planet I bought?" answer="No. Only you and the seller are able to decrypt the planet's coordinates." />
<QuestionAnswer question="Market/Orders data seems off?" answer="Don't forget to pull fresh data from the contract by clicking 'Refresh' from the 'Market' or 'My Listings' tab." />
<QuestionAnswer question="How do I sell a planet?" answer="Sell a planet from the 'My Planets' tab. Wait for an order. Confirm any order by clicking on it from the 'Market' or 'My Listings' tab." />
<QuestionAnswer question="How do I buy a planet?" answer="Select a planet from the 'Market' tab. Click to see its details and place an order. Wait for it to be accepted by the seller."/>
<QuestionAnswer question="How do I decrypt coordinates?" answer="Go the 'Decrypt' tab. Copy the transaction hash of the planet listing. Paste it in the corresponding input. Copy the transaction hash of the planet sale. Click 'decrypt'." />
</div>
)
}
);
}