mirror of
https://github.com/factorgroup/nightmarket.git
synced 2026-01-10 05:58:10 -05:00
feat: user can access FAQs in the 'Guide' tab
This commit is contained in:
16
client/plugin/components/QuestionAnswer.tsx
Normal file
16
client/plugin/components/QuestionAnswer.tsx
Normal 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>
|
||||
);
|
||||
};
|
||||
@@ -65,4 +65,11 @@ export const myPlanetstyles = {
|
||||
empty: {
|
||||
color: "#838383",
|
||||
},
|
||||
};
|
||||
|
||||
export const faqStyles = {
|
||||
question: {
|
||||
textDecoration: "underline",
|
||||
|
||||
}
|
||||
};
|
||||
5
client/plugin/typings/typings.d.ts
vendored
5
client/plugin/typings/typings.d.ts
vendored
@@ -111,4 +111,9 @@ type ListingItemProps = {
|
||||
actionButtonTheme: string;
|
||||
onClickOrders: () => void;
|
||||
onClickAction: () => void;
|
||||
};
|
||||
|
||||
type QuestionAnswerProps = {
|
||||
question: string;
|
||||
answer: string;
|
||||
};
|
||||
@@ -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>
|
||||
)
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user