Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Onboarding flow for dashboard #825

Merged
merged 3 commits into from
Aug 24, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 18 additions & 19 deletions app/[addressOrDomain]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import Typography from "@components/UI/typography/typography";
import { TEXT_TYPE } from "@constants/typography";
import { a11yProps } from "@components/UI/tabs/a11y";
import { CustomTabPanel } from "@components/UI/tabs/customTab";
import SuggestedQuests from "@components/dashboard/SuggestedQuests";

type AddressOrDomainProps = {
params: {
Expand Down Expand Up @@ -352,20 +353,20 @@ export default function Page({ params }: AddressOrDomainProps) {
{...a11yProps(0)}
/>
{claimableQuests.length > 0 ? (
<Tab
disableRipple
sx={{
borderRadius: "10px",
padding: "0px 12px 0px 12px",
textTransform: "none",
fontWeight: "600",
fontSize: "12px",
fontFamily: "Sora",
minHeight: "32px",
}}
label={`To claim (${claimableQuests})`}
{...a11yProps(1)}
/>
<Tab
disableRipple
sx={{
borderRadius: "10px",
padding: "0px 12px 0px 12px",
textTransform: "none",
fontWeight: "600",
fontSize: "12px",
fontFamily: "Sora",
minHeight: "32px",
}}
label={`To claim (${claimableQuests})`}
{...a11yProps(1)}
/>
) : null}
</Tabs>
</div>
Expand All @@ -374,11 +375,9 @@ export default function Page({ params }: AddressOrDomainProps) {
{questsLoading ? (
<QuestSkeleton />
) : completedQuests?.length === 0 ? (
<Typography type={TEXT_TYPE.H2} className={styles.noBoosts}>
{isOwner
? "You have not completed any quests at the moment"
: "User has not completed any quests at the moment"}
</Typography>
isOwner
? <SuggestedQuests />
: <Typography type={TEXT_TYPE.H2} className={styles.noBoosts}>User has not completed any quests at the moment</Typography>
) : (
<section className={QuestStyles.section}>
<div className={QuestStyles.questContainer}>
Expand Down
21 changes: 21 additions & 0 deletions components/dashboard/SuggestedQuests.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import React from "react";
import Typography from "@components/UI/typography/typography";
import { TEXT_TYPE } from "@constants/typography";
import QuestStyles from "@styles/Home.module.css";
import QuestCardCustomised from "./CustomisedQuestCard";

const SuggestedQuests: React.FC = () => {
return (
<div>
<Typography type={TEXT_TYPE.H1} className="title extrabold mb-3.5">New explorer, start your quest!</Typography>
<div className="text-center mb-12">Get started on your Starknet adventure by tackling your first quest and begin collecting rewards!</div>
<div className={QuestStyles.questContainer}>
<QuestCardCustomised key={27} id={27} />
<QuestCardCustomised key={27} id={27} />
<QuestCardCustomised key={27} id={27} />
PedroCo3lho marked this conversation as resolved.
Show resolved Hide resolved
</div>
</div>
);
};

export default SuggestedQuests;