Skip to content

Commit

Permalink
introduce tutorialList and tutorialShortList
Browse files Browse the repository at this point in the history
  • Loading branch information
bgptr committed Dec 23, 2023
1 parent fb17680 commit a27a51e
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 25 deletions.
14 changes: 3 additions & 11 deletions app/components/views/GetStartedPage/LoadingPage/LoadingPage.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {
TutorialOverview,
tutorials
tutorials,
tutorialList
} from "../../SettingsPage/TutorialsTab/helpers";
import { Subtitle } from "shared";
import { FormattedMessage as T } from "react-intl";
Expand All @@ -18,16 +19,7 @@ const LoadingPage = ({ onShowOnboardingTutorial }) => {
/>
}
/>
{[
"decredIntro",
"ln",
"consensusCode",
"powPos",
"tickets",
"staking",
"lifecycle",
"consensusVoting"
].map((name) => (
{tutorialList.map((name) => (
<TutorialOverview
{...{
key: name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ import { FormContainer, ContentContainer /* , Row */ } from "../../helpers";
import styles from "./Form.module.css";
import {
TutorialOverview,
tutorials
tutorials,
tutorialShortList
} from "../../../SettingsPage/TutorialsTab/helpers";
import {
LoaderTitleMsg,
Expand Down Expand Up @@ -302,7 +303,7 @@ const WalletSelectionForm = ({
/>
}
/>
{["decredIntro", "powPos", "lifecycle", "blocks"].map((name) => (
{tutorialShortList.map((name) => (
<TutorialOverview
{...{
key: name,
Expand Down
18 changes: 7 additions & 11 deletions app/components/views/SettingsPage/TutorialsTab/TutorialsTab.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import { FormattedMessage as T } from "react-intl";
import { Subtitle } from "shared";
import { TutorialOverview, TutorialPage, tutorials } from "./helpers";
import {
TutorialOverview,
TutorialPage,
tutorials,
tutorialList
} from "./helpers";
import { useTutorialsTab } from "./hooks";
import styles from "./TutorialsTab.module.css";

Expand Down Expand Up @@ -40,16 +45,7 @@ const TutorialsTab = () => {
<Subtitle
title={<T id="tutorials.learnAboutDecred" m="Learn about decred" />}
/>
{[
"decredIntro",
"ln",
"consensusCode",
"powPos",
"tickets",
"staking",
"lifecycle",
"consensusVoting"
].map((name) => (
{tutorialList.map((name) => (
<TutorialOverview
{...{
key: name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@ export { default as TutorialCard } from "./TutorialCard";
export { default as TutorialOverview } from "./TutorialOverview";
export { default as TutorialPage } from "./TutorialPage";
export { default as PagedTutorial } from "./PagedTutorial";
export { default as tutorials } from "./tutorials";
export {
default as tutorials,
tutorialList,
tutorialShortList
} from "./tutorials";
Original file line number Diff line number Diff line change
Expand Up @@ -395,4 +395,23 @@ tutorials.identity = {
}
]
};

export const tutorialList = [
"decredIntro",
"ln",
"consensusCode",
"powPos",
"tickets",
"staking",
"lifecycle",
"consensusVoting"
];

export const tutorialShortList = [
"decredIntro",
"powPos",
"lifecycle",
"consensusCode"
];

export default tutorials;

0 comments on commit a27a51e

Please sign in to comment.