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(107): Participants section #113

Merged
merged 155 commits into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
155 commits
Select commit Hold shift + click to select a range
4b73780
Rebase fixing
RyRy79261 Mar 26, 2024
bbf3bff
Depcheckfix
RyRy79261 Mar 26, 2024
f77f4b1
Working on locks
RyRy79261 Mar 27, 2024
b3ad4a3
Relock
RyRy79261 Mar 27, 2024
2a630e5
Extracted locks
RyRy79261 Mar 27, 2024
d472656
Fixed key issue
RyRy79261 Mar 27, 2024
c3e29f5
Merge branch 'develop' into feat/95-read-functions
RyRy79261 Mar 27, 2024
5d22952
Fixed dep
RyRy79261 Mar 27, 2024
cebee94
1 page down
RyRy79261 Mar 27, 2024
6a71175
Nailing down a few
RyRy79261 Mar 27, 2024
4a01d69
Card & button proving difficult
RyRy79261 Mar 28, 2024
f996eb5
Allowance functions
RyRy79261 Mar 28, 2024
9e9ca81
Mento reads
RyRy79261 Mar 28, 2024
eac0027
Last items
RyRy79261 Mar 28, 2024
b0bf1df
Included approve
RyRy79261 Mar 28, 2024
012304a
Added error callback hooks
RyRy79261 Mar 28, 2024
20a89e2
Removed redundant get names
RyRy79261 Mar 28, 2024
629223d
Fixed balance
RyRy79261 Mar 28, 2024
5521270
Refactored away from deprecated approach and ensured correct return
RyRy79261 Mar 28, 2024
ab13dd7
Nailing down a few
RyRy79261 Mar 28, 2024
3b27eaf
Removed redundant hook
RyRy79261 Mar 28, 2024
cc00c3e
Updated formatter to use radix
RyRy79261 Mar 28, 2024
8278880
Updated formatter to use radix
RyRy79261 Mar 28, 2024
44d78d9
Rebase fixing
RyRy79261 Mar 26, 2024
4b78450
Depcheckfix
RyRy79261 Mar 26, 2024
860450e
Working on locks
RyRy79261 Mar 27, 2024
797459b
Extracted locks
RyRy79261 Mar 27, 2024
696fe51
Fixed key issue
RyRy79261 Mar 27, 2024
3e63fb2
Add secretlint (#97)
chapati23 Mar 26, 2024
90a905e
Fix/65/59 - Governance params component & title (#82)
tplocic20 Mar 26, 2024
15f907c
Fixed dep
RyRy79261 Mar 27, 2024
2e764ae
Last items
RyRy79261 Mar 28, 2024
d01cc98
Removed redundant get names
RyRy79261 Mar 28, 2024
bef7b40
Fixed balance
RyRy79261 Mar 28, 2024
a0dfb62
Refactored away from deprecated approach and ensured correct return
RyRy79261 Mar 28, 2024
49ea57c
Removed redundant hook
RyRy79261 Mar 28, 2024
78e1c86
Updated formatter to use radix
RyRy79261 Mar 28, 2024
f27416b
Updated formatter to use radix
RyRy79261 Mar 28, 2024
92887d5
Merge branch 'develop' into feat/91-write-actions
RyRy79261 Mar 28, 2024
cd74cf1
Removed unneeded
RyRy79261 Mar 28, 2024
2f323ec
Merge branch 'feat/91-write-actions' into feat/94-sass-to-tailwind
RyRy79261 Mar 28, 2024
982aa6e
Merge branch 'develop' into feat/95-read-functions
RyRy79261 Mar 28, 2024
9884485
Trying to extract variables
RyRy79261 Mar 31, 2024
a653d6d
Date picker mostly converted
RyRy79261 Mar 31, 2024
508fbb3
Divider refactored
RyRy79261 Mar 31, 2024
72e0261
fix: de-sass card
denviljclarke Mar 28, 2024
76cf7be
fix: de-sass layout
denviljclarke Mar 28, 2024
f761178
fix: update tailwind config
denviljclarke Mar 28, 2024
b879c8c
fix: de-sass divider
denviljclarke Mar 28, 2024
104cb62
chore: update tailwind
denviljclarke Mar 28, 2024
24205ae
feat: recreate the custom `x{n}` spacing previously created in global…
denviljclarke Mar 28, 2024
4665669
chore: add auto tw class ordering
denviljclarke Mar 29, 2024
4b117df
chore: reorder tailwind classes w/ tailwind plugin
denviljclarke Mar 31, 2024
2d1bf4e
chore: update depcheck to include prettier plugin
denviljclarke Mar 31, 2024
c69a531
chore: fix tailwind spacing gen
denviljclarke Mar 31, 2024
abc1628
Trying the converter
RyRy79261 Mar 31, 2024
38d2286
fixed transparent issue
RyRy79261 Mar 31, 2024
9ae47c9
Improved colors in theme, moved spacing from keyframes to extends
RyRy79261 Mar 31, 2024
28b1388
Execution code
RyRy79261 Apr 2, 2024
af899a5
Locks list
RyRy79261 Apr 2, 2024
1d664d4
Theme switcher
RyRy79261 Apr 2, 2024
2e95ff1
Theme switch & vote list
RyRy79261 Apr 2, 2024
3b5ca64
Wallet addresses count down & proposals update
RyRy79261 Apr 2, 2024
4e982d7
Removing overwrite functions
RyRy79261 Apr 2, 2024
3b9336c
fix: tailwind config extend colors instead of replace
denviljclarke Apr 2, 2024
75285bf
fix: remove inter in global (already added via nextjs in layout.tsx)
denviljclarke Apr 2, 2024
3797532
fix: simplify dark mode using next-themes
denviljclarke Apr 2, 2024
cb7e3d0
fix: add theme switch border
denviljclarke Apr 3, 2024
67e3df4
fix: homepage header
denviljclarke Apr 3, 2024
ed6e7dc
fix: simplify icons
denviljclarke Apr 3, 2024
1cf95ca
fix: update badge
denviljclarke Apr 3, 2024
708c5cc
fix: update icons based on new api
denviljclarke Apr 3, 2024
76cb1eb
fix: re-add use storage hook
denviljclarke Apr 3, 2024
e56bd98
Fixed proposal list
RyRy79261 Apr 3, 2024
d0ae118
Enforced engines for vercel
RyRy79261 Apr 3, 2024
0886014
Badges fixed
RyRy79261 Apr 3, 2024
65206ad
Working on button
RyRy79261 Apr 3, 2024
eb9dfb4
Stable buttons, testing
RyRy79261 Apr 3, 2024
1835e2c
Clear done
RyRy79261 Apr 3, 2024
fc692e1
Buttons redone
RyRy79261 Apr 3, 2024
a06e5ec
Fixed grapgh
RyRy79261 Apr 3, 2024
c5c0986
Fixed graph serialization issue
RyRy79261 Apr 3, 2024
9fa29bb
Merge feat/95-read-actions
RyRy79261 Apr 3, 2024
ea0dbc2
Merged reads
RyRy79261 Apr 3, 2024
a961992
Merge branch 'feat/91-write-actions' into feat/94-sass-to-tailwind
RyRy79261 Apr 3, 2024
9979b5e
Merge branch 'develop' into feat/91-write-actions
RyRy79261 Apr 4, 2024
19d4c30
Merge branch 'feat/91-write-actions' into feat/94-sass-to-tailwind
RyRy79261 Apr 4, 2024
d8b6064
Changing to grid for params
RyRy79261 Apr 4, 2024
402632d
Landing almost done
RyRy79261 Apr 4, 2024
84da8e5
Most of header rebuilt
RyRy79261 Apr 4, 2024
cdd7a7f
Moving to drop down button
RyRy79261 Apr 4, 2024
8f88d4e
feat: add header - desktop + mobile
denviljclarke Apr 5, 2024
3398406
fix: header adjustments
denviljclarke Apr 5, 2024
e5a8fe1
feat: add footer - desktop + mobile
denviljclarke Apr 5, 2024
c5cc075
fix[home page]: mobile tweaks
denviljclarke Apr 5, 2024
f2b9706
Fixed fonts
RyRy79261 Apr 5, 2024
2c50491
fix: temp hidden overflow hidden to prevent breaking layout on mobile
denviljclarke Apr 5, 2024
b8fc127
fix: layout + home page tweaks
denviljclarke Apr 5, 2024
8247338
fix[header nav]: fine tune styling
denviljclarke Apr 5, 2024
1772f77
Set base on markup
RyRy79261 Apr 5, 2024
24b69af
fix[footer]: styling tweaks
denviljclarke Apr 5, 2024
691d1be
fix[proposal list section]: adjust header font size
denviljclarke Apr 5, 2024
a5420d5
feat[status badge]: add outline variant
denviljclarke Apr 5, 2024
88d527d
fix[home]: font size tweaks
denviljclarke Apr 5, 2024
ee22e30
fix[proposal summary]: design refinements
denviljclarke Apr 5, 2024
87440cc
Added background gradient
RyRy79261 Apr 5, 2024
9f99b1c
Optimized build, shaking barrels
RyRy79261 Apr 5, 2024
32c0cc3
fix[breadcrumbs]: fix styling
denviljclarke Apr 5, 2024
8a7c51c
Removed unneeded api endpoints
RyRy79261 Apr 5, 2024
6d358e3
External links for nav target
RyRy79261 Apr 5, 2024
4f03eff
Replaced blockies with modern variant
RyRy79261 Apr 5, 2024
89d20dd
fix: extend keyframes not overwrite + add loading skeleton to metrics…
denviljclarke Apr 5, 2024
980d844
fix: prevent link navigation when button disabled
denviljclarke Apr 8, 2024
07f5bb7
Dropdown converted, loader updated
RyRy79261 Apr 8, 2024
e2478f8
Fixed config
RyRy79261 Apr 8, 2024
1d6289a
Minor fixes to theme & nav for seo
RyRy79261 Apr 8, 2024
e99e162
Fixed darkmode background
RyRy79261 Apr 8, 2024
4625fda
fix: mobile menu transparent background - let there be gradient
denviljclarke Apr 8, 2024
4b6ff07
Nuked classnames
RyRy79261 Apr 8, 2024
6260bb0
Merge branch 'develop' into feat/94-sass-to-tailwind
RyRy79261 Apr 9, 2024
1dd3978
Integrating dependencies
RyRy79261 Apr 9, 2024
73e85d3
Fixed connect button
RyRy79261 Apr 9, 2024
6acf6a0
PR Feedback points
RyRy79261 Apr 9, 2024
a26dfe9
Updated the git ignore to filter out other package lock files
RyRy79261 Apr 9, 2024
ac6409f
Fixed default state
RyRy79261 Apr 9, 2024
7aac816
Merged Feat/94-sass
RyRy79261 Apr 9, 2024
d673287
Converted input, removed uncontrolled issue
RyRy79261 Apr 9, 2024
4b76a06
Modal roughly fixed
RyRy79261 Apr 10, 2024
625de9a
Connect wallet functional
RyRy79261 Apr 10, 2024
70bd530
Caching logic wired in
RyRy79261 Apr 10, 2024
b815d37
See more refactored
RyRy79261 Apr 11, 2024
c5cd1ae
Wiring in logic
RyRy79261 Apr 13, 2024
b65d7a9
Merged develop
RyRy79261 Apr 13, 2024
4b2c9e6
Fixing chain ID stuff
RyRy79261 Apr 14, 2024
78d0bbb
Chain in connector issue
RyRy79261 Apr 14, 2024
fc6376c
Getting proposal ID
RyRy79261 Apr 14, 2024
14f264d
Creation directs as quick as possible to the view page
RyRy79261 Apr 15, 2024
d986a5e
Fixed hyper syncing
RyRy79261 Apr 15, 2024
43ad0f5
Checkpoint: unifying progress bar
RyRy79261 Apr 16, 2024
82d6bc8
Page mostly fixed
RyRy79261 Apr 16, 2024
330f587
feat: 🌟 finished styling & refactored progress bars for stacking
RyRy79261 Apr 16, 2024
8316730
style: 💄 Fixed minor issues on create screens
RyRy79261 Apr 16, 2024
236860e
Merge branch 'feat/28-proposals-creation-refactored' into feat/39-cur…
RyRy79261 Apr 16, 2024
0b33866
fix: 🐛 defaulting to testnet data on freshload
RyRy79261 Apr 16, 2024
fea6b26
Width fixed, padding next
RyRy79261 Apr 16, 2024
4b10b29
style: 💄 fixed alignment issues
RyRy79261 Apr 16, 2024
21bf399
Merge branch 'feat/39-current-votes-refactored' into feat/109-connect…
RyRy79261 Apr 17, 2024
acabfe7
refactor: ⚒️ dropdown reworked
RyRy79261 Apr 17, 2024
d162770
Merge branch 'develop' into feat/39-current-votes-refactored
RyRy79261 Apr 18, 2024
2278633
Merge branch 'feat/39-current-votes-refactored' into feat/109-connect…
RyRy79261 Apr 18, 2024
8a3a845
feat: 🌟 added scroll area & fixed participants view
RyRy79261 Apr 19, 2024
17c504b
fix: review feedback
RyRy79261 Apr 23, 2024
36079ab
fix: darkmode styling
RyRy79261 Apr 24, 2024
1c99b70
Merge branch 'develop' into feat/107-participants-section
RyRy79261 Apr 24, 2024
8b7afd6
fix: remove grammar
RyRy79261 Apr 24, 2024
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
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"@hookform/resolvers": "^3.3.2",
"@mdxeditor/editor": "^1.11.2",
"@mento-protocol/mento-sdk": "^0.2.2",
"@radix-ui/react-scroll-area": "^1.0.5",
"@rainbow-me/rainbowkit": "^2.0.5",
"@tanstack/react-query": "^5.29.2",
"blo": "^1.1.1",
Expand Down
32 changes: 32 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/app/(routes)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default function RootLayout({ children }: RootLayoutProps) {
<html className={`${inter.variable} w-full overscroll-none`} lang="en">
<body
className={cn(
"w-full overscroll-none bg-white font-fg text-base dark:bg-black",
"w-full overscroll-none bg-white font-fg text-base antialiased dark:bg-black",
"[background-origin:border-box,_border-box]",
"[background-position:_0_0,_0_0]",
"[background-repeat:_repeat]",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,27 @@ export default function Participants({ votes }: Props) {
return (
<Card
// Was originally z-49
className="bottom-0 z-40 flex w-full grow flex-col gap-6"
className="bottom-0 z-40 flex w-full grow flex-col gap-6 p-4"
>
<Card.Header className="text-center text-[32px]/none font-medium">
<Card.Header className="text-center text-3xl font-medium">
Participants
</Card.Header>
<TabList tabs={["For", "Against", "Abstain"]}>
<VotesList voteType="for" votes={votes} />
<VotesList voteType="against" votes={votes} />
<VotesList voteType="abstain" votes={votes} />
<VotesList
participants={votes.for.participants}
voteTypeTotal={votes.for.total}
totalVotes={votes.total}
/>
<VotesList
participants={votes.against.participants}
voteTypeTotal={votes.against.total}
totalVotes={votes.total}
/>
<VotesList
participants={votes.abstain.participants}
voteTypeTotal={votes.abstain.total}
totalVotes={votes.total}
/>
</TabList>
</Card>
);
Expand Down
6 changes: 3 additions & 3 deletions src/components/_icons/crossmark.icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const CrossMarkIcon = ({
xmlns="http://www.w3.org/2000/svg"
>
<rect
className="fill-black stroke-black"
className="fill-black stroke-black dark:fill-white dark:stroke-white"
x="1.10547"
y="1.25977"
width="15"
Expand All @@ -26,13 +26,13 @@ export const CrossMarkIcon = ({
fillRule="evenodd"
clipRule="evenodd"
d="M12.7407 4.62446C12.9815 4.86525 12.9815 5.25564 12.7407 5.49643L5.34203 12.8951C5.10125 13.1359 4.71085 13.1359 4.47006 12.8951C4.22927 12.6543 4.22927 12.2639 4.47006 12.0231L11.8687 4.62446C12.1095 4.38367 12.4999 4.38367 12.7407 4.62446Z"
className="stroke-white"
className="stroke-white dark:stroke-black"
/>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M12.7398 12.895C12.499 13.1358 12.1086 13.1358 11.8678 12.895L4.46919 5.49633C4.2284 5.25554 4.2284 4.86515 4.46919 4.62436C4.70997 4.38357 5.10037 4.38357 5.34116 4.62436L12.7398 12.023C12.9806 12.2638 12.9806 12.6542 12.7398 12.895Z"
className="stroke-white"
className="stroke-white dark:stroke-black"
/>
</svg>
);
Expand Down
25 changes: 22 additions & 3 deletions src/components/_shared/avatar/avatar.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,35 @@
import BaseComponentProps from "@/interfaces/base-component-props.interface";
import { BlockExplorerLink } from "@/components/_shared";
import { blo, Address } from "blo";
import { VariantProps, cva } from "class-variance-authority";

interface AvatarProps extends BaseComponentProps {
const variants = cva("overflow-hidden rounded-full", {
variants: {
size: {
large: "h-[41px] w-[41px]",
medium: "h-[35px] w-[35px]",
small: "h-[20px] w-[20px]",
},
},
defaultVariants: {
size: "medium",
},
});

interface AvatarProps
extends BaseComponentProps,
VariantProps<typeof variants> {
address: string;
}

export const Avatar = ({ className, address }: AvatarProps) => {
export const Avatar = ({ className, address, size }: AvatarProps) => {
return (
<div
// TODO: border radius is 50%
className={`h-[35px] w-[35px] overflow-hidden rounded-full ${className}`}
className={variants({
className,
size,
})}
>
<BlockExplorerLink type="address" item={address}>
<img
Expand Down
2 changes: 1 addition & 1 deletion src/components/_shared/button/button.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { ComponentProps } from "react";

// TODO: group style types in cn combiner for readability
const variants = cva(
"relative block w-full rounded-md border border-solid border-black px-x4 py-x2 font-inter text-sm text-black transition [transform-style:preserve-3d] hover:no-underline hover:[&>span]:text-[inherit]",
"relative block w-full rounded-md border border-solid border-black px-6 py-4 font-inter text-sm text-black transition [transform-style:preserve-3d] hover:no-underline hover:[&>span]:text-[inherit]",
{
variants: {
disabled: {
Expand Down
19 changes: 14 additions & 5 deletions src/components/_shared/connect-button/connect-button.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export const ConnectedDropdown = ({
title={WalletHelper.getShortAddress(account.address)}
avatar={
<Avatar
size="small"
className="flex h-full flex-row items-center"
address={account.address || ""}
/>
Expand All @@ -54,7 +55,7 @@ export const ConnectedDropdown = ({
{isConnected ? (
// TODO: fix colors
<div className="flex w-full flex-col items-center border-b border-solid border-black dark:border-white">
<div className="flex w-full flex-row justify-between px-x1 py-x2">
<div className="flex w-full flex-row justify-between px-5 py-x2">
<div className="flex flex-row items-center p-x1 font-semibold">
<MentoIcon
className="mr-x1"
Expand All @@ -68,7 +69,8 @@ export const ConnectedDropdown = ({
{NumbersService.parseNumericValue(mentoBalance.formatted, 1)}
</div>
</div>
<div className="flex w-full flex-row justify-between px-x1 py-x2">
<hr className="mx-auto w-[calc(100%_-_40px)] border-t-gray-light" />
<div className="flex w-full flex-row justify-between px-5 py-x2">
<div className="flex flex-shrink flex-grow flex-row items-center p-x1 font-semibold">
<MentoIcon
className="mr-x1"
Expand All @@ -84,15 +86,22 @@ export const ConnectedDropdown = ({
</div>
</div>
) : null}
<DropdownButton.Element onClick={openAccountModal}>
<DropdownButton.Element
className="[&_button]:pl-5"
onClick={openAccountModal}
>
{/* TODO: Need account icon */}
<span>Account settings</span>
</DropdownButton.Element>
<DropdownButton.Element onClick={openChainModal}>
<DropdownButton.Element
className="[&_button]:pl-5"
onClick={openChainModal}
>
<span>Chain settings</span>
</DropdownButton.Element>
<hr className="mx-auto w-[calc(100%_-_40px)] border-t-gray-light" />
<DropdownButton.Element
className="*:flex *:items-center *:justify-center"
className="*:flex *:items-center *:justify-start [&_button]:pl-5"
onClick={() => disconnect()}
>
<DisconnectIcon />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ export const DropdownElement = ({
>
<button
className={cn(
"w-full whitespace-nowrap border-none bg-transparent p-x2",
"w-full whitespace-nowrap border-none bg-transparent px-5 py-3",
"text-left",
"group-first:rounded-t-lg group-last:rounded-b-lg group-hover:text-gray-alt66",
)}
onClick={onClick}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ import { VariantProps, cva } from "class-variance-authority";
import { cn } from "@/styles/helpers";

const variants = cva(
"[transition:opacity_0.3s,_transform 0.3s_0.1s_ease-in,_z-index_0.1s_1s] pointer-events-none absolute top-x14 z-[-1] min-w-full -translate-y-x10 overflow-hidden opacity-0",
"[transition:opacity_0.3s,_transform 0.3s_0.1s_ease-in,_z-index_0.1s_1s] pointer-events-none absolute top-x14 z-[-1] min-w-full -translate-y-x10 overflow-hidden opacity-0 md:w-64",
{
variants: {
align: {
left: "left-0",
right: "right-0",
},
fullwidth: { true: "", false: "max-w-[200px]" },
fullwidth: { true: "", false: "max-w-64" },
opened: {
true: "pointer-events-auto z-10 translate-y-0 opacity-100",
false: "",
Expand Down Expand Up @@ -84,6 +84,7 @@ type DropdownButtonProps = ComponentProps<"button"> &
VariantProps<typeof variants> & {
title?: string;
avatar?: ReactNode;
buttonClassName?: string;
};

export const DropdownButton = ({
Expand All @@ -92,6 +93,7 @@ export const DropdownButton = ({
children,
title,
fullwidth,
buttonClassName,
avatar,
}: DropdownButtonProps) => {
const [alignment, setAlignment] = useState<"left" | "right">("right");
Expand Down Expand Up @@ -148,7 +150,7 @@ export const DropdownButton = ({
<Button
fullwidth={fullwidth}
theme={theme}
className="min-w-x12 [&_button]:min-w-x12"
className={cn("min-w-x12", buttonClassName)}
onClick={() => setDropdownOpened(!dropdownOpened)}
>
{!!avatar && avatar}
Expand All @@ -173,6 +175,7 @@ export const DropdownButton = ({
variants({
align: alignment,
theme,
fullwidth,
opened: dropdownOpened,
className,
}),
Expand Down
2 changes: 1 addition & 1 deletion src/components/_shared/header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const DesktopHeader = () => {
<MentoLogoIcon className="h-6 w-[108px]" />
</Link>
<HeaderNav />
<ConnectButton />
<ConnectButton fullwidth={true} />
</div>
</MaxWidthWrapper>
</header>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ export const MultiProgressBar = ({
className,
)}
>
{/* <div className="flex h-4 w-full overflow-hidden rounded-3xl border-[0.5px] border-solid border-black dark:border-gray"> */}
<div className="relative h-4 w-full overflow-hidden rounded-3xl border-[0.5px] border-solid border-black dark:border-gray">
{progressBars
.sort((a, b) => b.progress - a.progress)
Expand Down
23 changes: 18 additions & 5 deletions src/components/_shared/tabs/tab-list.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,21 @@ const variants = cva("sticky top-0 z-10 flex bg-inherit px-0 py-x1", {
},
});

const buttonVariant = cva(
"m-0 cursor-pointer border-none bg-none p-0 text-lg text-gray-light hover:text-primary",
{
variants: {
selected: {
true: "font-medium text-primary",
false: "",
},
},
defaultVariants: {
selected: false,
},
},
);

export interface TabListProps
extends ComponentProps<"div">,
VariantProps<typeof variants> {
Expand All @@ -40,11 +55,9 @@ export const TabList = ({
{tabs.map((tab, index) => (
<button
key={index}
className={cn(
// TODO: CVA
"m-0 cursor-pointer border-none bg-none p-0 text-gray-light hover:text-primary",
index === selectedTab && "font-medium text-primary",
)}
className={buttonVariant({
selected: index === selectedTab,
})}
onClick={() => setSelectedTab(index)}
>
{tab}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
} from "../create-proposal-provider";
import { parseUnits } from "viem";
import { CreateProposalWrapper } from "../create-proposal-wrapper/create-proposal-wrapper.component";
import Link from "next/link";

enum WalletStepEnum {
connectWallet = "connectWallet",
Expand Down Expand Up @@ -35,13 +36,13 @@ const CurrentFormStep = ({ formStep }: { formStep: WalletStepEnum }) => {
</p>
<p className="font-size-x4 line-height-x5 place-self-start">
You can purchase MENTO{" "}
<a
<Link
href={"https://app.mento.org"}
className="text-primary underline"
target="_blank"
>
here.
</a>
</Link>
</p>
</>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,14 @@ export const ProposalCurrentVotes = ({
</>
)}
{quorumNeeded <= BigInt(proposal.votes.for.total) && (
<>Quorum reached.</>
<>Quorum reached</>
)}
</>
)}
RyRy79261 marked this conversation as resolved.
Show resolved Hide resolved
</div>
</div>
</div>
</div>
<div></div>
</div>
</Card>
);
Expand Down
Loading
Loading