-
Notifications
You must be signed in to change notification settings - Fork 9
161-feature-donors-page-and-leaderboard #163
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
Open
Jikugodwill
wants to merge
53
commits into
staging
Choose a base branch
from
161-feature-donors-page-and-leaderboard
base: staging
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
220791e
Added Leaderboard card
Jikugodwill ed40356
Added trophy
Jikugodwill 0e9e2aa
Started working on UI
Jikugodwill f3586d1
Refactor LeaderboardCard component to dynamically set icon color base…
Jikugodwill ed56eb3
Refactor LeaderboardPage component to update selectedTab state and ad…
Jikugodwill 3106055
Refactor button component to add sec-brand-filled variant
Jikugodwill 051ab03
Refactor LeaderboardPage component to add activities tab and display …
Jikugodwill 6eeaea9
updated UI for mobile responsiveness
Jikugodwill 40f2ff1
Refactor LeaderboardPage component to update activity card layout and…
Jikugodwill 63731ec
completed final UI fixes
Jikugodwill 959a4b7
Creatd filter chip
Jikugodwill cad0abc
exported filter-chip from components
Jikugodwill b68d61e
updated filterchip instead of button
Jikugodwill 5c98750
fixed breakpoints
Jikugodwill 3264fca
imported filterchip to index in components
Jikugodwill 7489046
updatd timeAgo function
Jikugodwill fc86155
reverted client file in api/potlock/generated
Jikugodwill 1b6069f
updates on UI breakpoints
Jikugodwill add1d01
Added final breakpoints
Jikugodwill a796bd8
leaderboard card fix
Jikugodwill ce03e05
UI fixes
Jikugodwill d9aa75e
Final UI updates
Jikugodwill b9559d4
Merge branch 'staging' of https://github.com/PotLock/potlock-nextjs-a…
akaia-shadowfox 3d39dc0
Added Leaderboard
Jikugodwill 8ee30ea
UI fix
Jikugodwill d81f3de
more UI fixes
Jikugodwill 6f63a69
fixed padding for filterchip
Jikugodwill 3f02720
more UI updates
Jikugodwill 9587e75
Merge branch 'staging' of https://github.com/PotLock/potlock-nextjs-a…
Jikugodwill f20241c
fmt
Jikugodwill a92ccd2
Made changes from commit
Jikugodwill c0bc3bc
made changes to page width and nav width
Jikugodwill cfd45b4
removed padding on larger devices
Jikugodwill 7ef2f46
updated scrolls
Jikugodwill cc67ff6
put scroll back
Jikugodwill 25e3e10
fix tabs width
M-Rb3 d3b20ec
moved max-width down
Jikugodwill 76c74c2
Merge branch '161-feature-donors-page-and-leaderboard' of https://git…
Jikugodwill aacbc78
fix cards width
M-Rb3 36552fd
Merge branch '161-feature-donors-page-and-leaderboard' of https://git…
M-Rb3 7d61cd4
Merge branch 'staging' of https://github.com/PotLock/potlock-nextjs-a…
Jikugodwill ccd3372
Merge branches '161-feature-donors-page-and-leaderboard' and 'staging…
Jikugodwill 25f285e
added hook
Jikugodwill 06ed323
imported hook to leaderboard page
Jikugodwill d46a4ba
Added actuall donors data
Jikugodwill 5b5a74f
Added code for donors data
Jikugodwill 7ef42c4
Merge branch 'staging' of https://github.com/PotLock/potlock-nextjs-a…
Jikugodwill 330f33c
Merge branch 'staging' of https://github.com/PotLock/potlock-nextjs-a…
Jikugodwill 75d540b
Donors data and hanlding for sponsors mock data
Jikugodwill 229e419
fix for price of one near
Jikugodwill a1927c1
Merge branch 'staging' of https://github.com/PotLock/potlock-nextjs-a…
Jikugodwill c5d2de7
Merge branch 'staging' of github.com:PotLock/potlock-nextjs-app into …
akaia-shadowfox b667cd4
chore: Format
akaia-shadowfox 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
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,14 @@ | ||
// TODO!: Delete this file and use an icon library package component instead! | ||
|
||
const Trophy = (props: any) => { | ||
return ( | ||
<svg {...props} viewBox="0 0 19 18" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||
<path | ||
d="M4.66797 18V16H8.66797V12.9C7.8513 12.7167 7.12214 12.3708 6.48047 11.8625C5.8388 11.3542 5.36797 10.7167 5.06797 9.95C3.81797 9.8 2.77214 9.25417 1.93047 8.3125C1.0888 7.37083 0.667969 6.26667 0.667969 5V4C0.667969 3.45 0.863802 2.97917 1.25547 2.5875C1.64714 2.19583 2.11797 2 2.66797 2H4.66797V0H14.668V2H16.668C17.218 2 17.6888 2.19583 18.0805 2.5875C18.4721 2.97917 18.668 3.45 18.668 4V5C18.668 6.26667 18.2471 7.37083 17.4055 8.3125C16.5638 9.25417 15.518 9.8 14.268 9.95C13.968 10.7167 13.4971 11.3542 12.8555 11.8625C12.2138 12.3708 11.4846 12.7167 10.668 12.9V16H14.668V18H4.66797ZM4.66797 7.8V4H2.66797V5C2.66797 5.63333 2.8513 6.20417 3.21797 6.7125C3.58464 7.22083 4.06797 7.58333 4.66797 7.8ZM14.668 7.8C15.268 7.58333 15.7513 7.22083 16.118 6.7125C16.4846 6.20417 16.668 5.63333 16.668 5V4H14.668V7.8Z" | ||
fill={props.fill || "#91321B`"} | ||
/> | ||
</svg> | ||
); | ||
}; | ||
|
||
export default Trophy; |
57 changes: 57 additions & 0 deletions
57
src/features/donation/components/DonationLeaderboardEntry.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,57 @@ | ||
import Image from "next/image"; | ||
|
||
import Trophy from "@/common/ui/layout/svg/Trophy"; | ||
|
||
export type DonationLeaderboardEntryProps = { | ||
rank: number; | ||
image: string; | ||
name: string; | ||
amount: number; | ||
type: "donor" | "sponsor"; | ||
}; | ||
|
||
export const DonationLeaderboardEntry: React.FC<DonationLeaderboardEntryProps> = ({ | ||
rank, | ||
image, | ||
name, | ||
amount, | ||
type, | ||
}) => { | ||
const bgClass = | ||
rank === 1 | ||
? "bg-gradient-to-r from-orange-400 to-red-500 text-white" | ||
: rank === 2 | ||
? "bg-gradient-to-r from-#F7F7F7 to-#DBDBDB" | ||
: "bg-gradient-to-r from-#FCE9D5 to-#F8D3B0"; | ||
|
||
akaia-shadowfox marked this conversation as resolved.
Show resolved
Hide resolved
|
||
const rankText = ["1st", "2nd", "3rd"][rank - 1]; | ||
|
||
const iconClass = rank === 1 ? "fill-yellow-400" : rank === 2 ? "fill-gray-400" : "fill-red-800"; | ||
|
||
return ( | ||
<div className={`w-288px overflow-hidden rounded-2xl border border-gray-200 pb-4`}> | ||
<div className={`flex items-center justify-between p-4 ${bgClass}`}> | ||
<div> | ||
<Trophy className={`h-6 w-6 ${iconClass}`} /> | ||
</div> | ||
<span className="text-lg font-bold">{rankText}</span> | ||
</div> | ||
<div className="p-20px flex flex-col items-center"> | ||
<Image | ||
src={image ?? ""} | ||
alt={name} | ||
className="mb-12px h-20 w-20 rounded-full" | ||
width={80} | ||
height={80} | ||
/> | ||
<p className="font-500 text-#292929 font-14px mb-2 text-center">{name}</p> | ||
<p className="font-600 text-center text-2xl"> | ||
{amount}{" "} | ||
<span className="text-#292929 font-600 text-sm"> | ||
NEAR {type === "donor" ? "Donated" : "Sponsored"} | ||
</span> | ||
</p> | ||
</div> | ||
</div> | ||
akaia-shadowfox marked this conversation as resolved.
Show resolved
Hide resolved
|
||
); | ||
}; |
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
Oops, something went wrong.
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.