-
Notifications
You must be signed in to change notification settings - Fork 0
Feat/earn page #42
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
Merged
Merged
Feat/earn page #42
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
e9369ab
feat(frontend): earn-page
tractorss 8bbb049
Merge branch 'master' into feat/earn-page
tractorss a67dccd
refactor(frontend): style-refactor
tractorss de3dc3b
refactor(frontend): rabbit-feedback
tractorss 9ad4eeb
refactor(frontend): tab-index
tractorss File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,52 @@ | ||
import React from "react"; | ||
|
||
import Image from "next/image"; | ||
|
||
import { HeroQueryType } from "@/queries/earn/hero"; | ||
|
||
interface IHero { | ||
heroData: HeroQueryType; | ||
} | ||
|
||
const Hero: React.FC<IHero> = ({ heroData }) => { | ||
const { title, subtitle, statDisplay, background } = heroData.earnPageHero; | ||
return ( | ||
<div className="relative pt-44 lg:pt-56 pb-[304px] lg:pb-72 px-6 lg:px-32"> | ||
<div className="space-y-8"> | ||
<h1 className="text-3xl lg:text-4xl font-medium">{title}</h1> | ||
<p className="text-lg">{subtitle}</p> | ||
|
||
<div className="bg-background-translucent md:w-fit rounded-full flex items-center gap-8 p-4 pr-8"> | ||
<Image | ||
src={statDisplay.icon.url} | ||
alt="icon" | ||
width={90} | ||
height={90} | ||
className="object-contain" | ||
/> | ||
<div className="flex flex-col"> | ||
<label className="text-base text-primary-text"> | ||
{statDisplay.statName} | ||
</label> | ||
<div className="flex flex-row"> | ||
<h2 className="text-primary-text font-medium text-xl lg:text-2xl"> | ||
{statDisplay.statValue} | ||
</h2> | ||
<h2 className="text-primary-blue text-xl lg:text-2xl"> | ||
{statDisplay.statValueSuffix} | ||
</h2> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<Image | ||
src={background.url} | ||
alt="Hero Image Background" | ||
fill | ||
className="absolute top-0 left-0 h-full z-[-1] object-cover" | ||
/> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Hero; |
68 changes: 68 additions & 0 deletions
68
frontend/src/components/Earn/TabSection/CuratorTabContent/KlerosScoutSection.tsx
This file contains hidden or 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,68 @@ | ||
import clsx from "clsx"; | ||
import Image from "next/image"; | ||
import Link from "next/link"; | ||
|
||
import Button from "@/components/Button"; | ||
import ExternalLink from "@/components/ExternalLink"; | ||
import { KlerosScoutSection as IKlerosScoutSection } from "@/queries/earn/tabs-data"; | ||
|
||
const KlerosScoutSection: React.FC<IKlerosScoutSection> = ({ | ||
header, | ||
productName, | ||
productIcon, | ||
background, | ||
learnMoreButton, | ||
arrowLinks, | ||
}) => { | ||
return ( | ||
<div | ||
className={clsx( | ||
"bg-background-1 rounded-2xl", | ||
"flex flex-col gap-8 py-8 md:py-12 px-6 md:px-8" | ||
)} | ||
> | ||
<div className="flex flex-col md:flex-row gap-6"> | ||
<Image | ||
width={128} | ||
height={128} | ||
src={productIcon.url} | ||
alt="Product Icon" | ||
/> | ||
<div className="flex flex-col gap-4"> | ||
<div className="text-lg text-primary-purple">{header}</div> | ||
<div className="text-xl md:text-2xl text-primary-text"> | ||
{productName} | ||
</div> | ||
</div> | ||
</div> | ||
<div | ||
style={{ backgroundImage: `url(${background.url})` }} | ||
className={clsx( | ||
"relative h-[308px] md:h-[380px] rounded-2xl", | ||
"bg-[#bca2df] bg-[-314px] md:bg-[0px] bg-cover bg-blend-luminosity", | ||
"flex justify-center items-center pt-3 md:pt-0" | ||
)} | ||
> | ||
<Link | ||
href={learnMoreButton.link.url} | ||
target="_blank" | ||
rel="noreferrer noopener" | ||
className="z-[1] mt-16 md:mt-0" | ||
> | ||
<Button className="text-background-1">{learnMoreButton.text}</Button> | ||
</Link> | ||
</div> | ||
<div className="flex flex-col md:flex-row items-center gap-8"> | ||
{arrowLinks.map((arrowLink) => ( | ||
<ExternalLink | ||
key={arrowLink.text} | ||
text={arrowLink.text} | ||
url={arrowLink.link.url} | ||
/> | ||
))} | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default KlerosScoutSection; |
36 changes: 36 additions & 0 deletions
36
frontend/src/components/Earn/TabSection/CuratorTabContent/index.tsx
This file contains hidden or 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,36 @@ | ||
import CtaCard from "@/components/CtaCard"; | ||
import ExternalLink from "@/components/ExternalLink"; | ||
import { EarnPageBecomeACuratorTab } from "@/queries/earn/tabs-data"; | ||
import KlerosScoutSection from "./KlerosScoutSection"; | ||
|
||
const CuratorTabContent: React.FC<EarnPageBecomeACuratorTab> = ({ | ||
title, | ||
description, | ||
ctaCard, | ||
arrowLink, | ||
scoutExplanation, | ||
klerosScoutSection, | ||
}) => { | ||
return ( | ||
<div className="pt-[88px] pb-7 lg:pt-24 lg:pb-12 space-y-12"> | ||
<div className="text-2xl md:text-3xl font-medium text-primary-text"> | ||
{title} | ||
</div> | ||
<div className="text-lg text-secondary-text">{description}</div> | ||
<div className="grid grid-cols-1 lg:grid-cols-3 gap-6"> | ||
{ctaCard.map((card) => ( | ||
<CtaCard key={card.title} {...card} /> | ||
))} | ||
</div> | ||
<ExternalLink | ||
url={arrowLink.link.url} | ||
text={arrowLink.text} | ||
className="flex-wrap justify-center" | ||
/> | ||
<p className="text-lg text-secondary-text pt-8">{scoutExplanation}</p> | ||
<KlerosScoutSection {...klerosScoutSection} /> | ||
</div> | ||
); | ||
}; | ||
|
||
export default CuratorTabContent; |
52 changes: 52 additions & 0 deletions
52
frontend/src/components/Earn/TabSection/JurorTabContent/CourtsSection.tsx
This file contains hidden or 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,52 @@ | ||
import Image from "next/image"; | ||
import Link from "next/link"; | ||
|
||
import PlusIcon from "@/assets/svgs/icons/plus-icon.svg"; | ||
import Tag from "@/components/Tag"; | ||
import { Court } from "@/queries/earn/tabs-data"; | ||
import { ArrowLink } from "@/queries/navbar"; | ||
|
||
interface ICourtsSection { | ||
mostActiveCourtsHeader: string; | ||
mostActiveCourts: Court[]; | ||
courtsButton: ArrowLink; | ||
} | ||
const CourtsSection: React.FC<ICourtsSection> = ({ | ||
mostActiveCourtsHeader, | ||
mostActiveCourts, | ||
courtsButton | ||
}) => { | ||
return ( | ||
<> | ||
<h2 className="text-lg md:text-xlfont-medium md:font-normal "> | ||
{mostActiveCourtsHeader} | ||
</h2> | ||
<div className="flex flex-row flex-wrap items-center gap-4"> | ||
{mostActiveCourts.map((court) => ( | ||
<Tag | ||
key={court.name} | ||
text={court.name} | ||
className="!text-base leading-none" | ||
/> | ||
))} | ||
<Link | ||
href={courtsButton.link.url} | ||
target="_blank" | ||
rel="noreferrer noopener" | ||
> | ||
<button className="w-12 h-12 border-gradient-purple-blue"> | ||
<Image | ||
src={PlusIcon} | ||
width="24" | ||
height="18" | ||
alt="Plus icon" | ||
className="inline" | ||
/> | ||
</button> | ||
</Link> | ||
</div> | ||
</> | ||
); | ||
}; | ||
|
||
export default CourtsSection; |
31 changes: 31 additions & 0 deletions
31
frontend/src/components/Earn/TabSection/JurorTabContent/EnterCourtSection.tsx
This file contains hidden or 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,31 @@ | ||
import React from "react"; | ||
import Button from "@/components/Button"; | ||
import { EnterCourtSection as IEnterCourtSection } from "@/queries/earn/tabs-data"; | ||
import Image from "next/image"; | ||
import Link from "next/link"; | ||
import ExternalLink from "@/components/ExternalLink"; | ||
|
||
const EnterCourtSection: React.FC<IEnterCourtSection> = ({ button,arrowLink, background }) => { | ||
return ( | ||
<div className="relative w-full flex flex-col items-center justify-center mt-16 p-8 "> | ||
<Link | ||
href={button.link.url} | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
className="mb-8 z-[1]" | ||
> | ||
<Button> | ||
<span className="text-background-2">{button.text}</span> | ||
</Button> | ||
</Link> | ||
tractorss marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<ExternalLink url={arrowLink.link.url} text={arrowLink.text} className="flex-wrap justify-center z-[1]"/> | ||
<Image | ||
src={background.url} | ||
alt="Learn more Image Background" | ||
fill | ||
className="object-cover rounded-2xl" | ||
/> | ||
</div> | ||
); | ||
}; | ||
export default EnterCourtSection; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.