Skip to content

Commit

Permalink
refactor: proposal joined date
Browse files Browse the repository at this point in the history
  • Loading branch information
franciscotobar committed Dec 3, 2024
1 parent e1201f7 commit b0f6c24
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ export const ActiveBuildersGridItem: FC<ActiveBuildersGridItemProps> = ({
<div className="flex flex-row w-full items-center gap-x-3 min-h-11">
<Jdenticon className="rounded-md bg-white" value={address} size="32" />
<div className="flex-1 min-w-0">
{/* TODO: To be reviewed, it's weird that we show the address in the tooltip
and then we copy the builder name, since the builder name it's generally easier to remember
*/}
<Popover
content={
<div className="text-[12px] font-bold mb-1">
Expand All @@ -67,9 +64,6 @@ export const ActiveBuildersGridItem: FC<ActiveBuildersGridItemProps> = ({
/>
</Typography>
</Popover>
{builderState === 'active' && (
<Paragraph className="text-sm font-light"> Joined {joiningDate}</Paragraph>
)}
</div>
<div className="flex justify-center items-center">
<Badge
Expand All @@ -83,6 +77,7 @@ export const ActiveBuildersGridItem: FC<ActiveBuildersGridItemProps> = ({
<div onClick={() => router.push(`/proposals/${proposalId}`)} className="cursor-pointer">
<Span className="text-base font-semibold">Proposal</Span>
<Span className="text-sm line-clamp-1 text-wrap">{proposalName}</Span>
<Span className="text-sm"> Created on {joiningDate}</Span>
</div>
)
return <Card header={Header} body={Body} />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { AddressOrAlias } from '@/components/Address'
import { Badge } from '@/components/Badge'
import { Jdenticon } from '@/components/Header/Jdenticon'
import { Paragraph, Typography } from '@/components/Typography'
import { Typography } from '@/components/Typography'
import { FC } from 'react'
import { Builder, BuilderProposal, BuilderStateFlags } from '../../types'

Expand All @@ -16,7 +16,6 @@ export const BuilderAllocationHeader: FC<BuilderAllocationHeaderProps> = ({
address,
builderName,
stateFlags,
date,
gauge,
}) => {
const state = stateFlags as BuilderStateFlags
Expand All @@ -28,13 +27,15 @@ export const BuilderAllocationHeader: FC<BuilderAllocationHeaderProps> = ({
<Typography tagVariant="label" className="font-semibold line-clamp-1 text-wrap text-base leading-4">
<AddressOrAlias addressOrAlias={builderName || address} className="text-base font-bold leading-4" />
</Typography>
{isBuilderActive(state) && (
<Badge content="Active" className="bg-[#DBFEE5] text-secondary py-1 px-1 text-[12px]" />
)}
{gauge && !state.communityApproved && (
<Badge content="Deactivated" className="bg-[#932309] color-text-primary py-1 px-1 text-[12px]" />
)}
{state.paused && state.communityApproved && (
<Badge content="Paused" className="bg-[#F9E1FF] text-secondary py-1 px-1 text-[12px]" />
)}
{isBuilderActive(state) && <Paragraph className="text-sm font-light"> Joined {date}</Paragraph>}
</div>
</div>
)
Expand Down

0 comments on commit b0f6c24

Please sign in to comment.