Skip to content

Commit

Permalink
enhancement: add rewards at the top for mobile in contest page (#2199)
Browse files Browse the repository at this point in the history
  • Loading branch information
nakedfool authored Aug 24, 2024
1 parent ba76d76 commit 834d85a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,7 @@ const ContestRewardsInfo: FC<ContestRewardsInfoProps> = ({ rewardsModuleAddress,
{formatBalance(currentUnpaidToken.tokenBalance)} $
<span className="uppercase mr-1 truncate inline-block overflow-hidden">{currentUnpaidSymbol}</span>
</div>

{!isMobile ? (
<>
to {payees.length} {payees.length > 1 ? "winners" : "winner"}
</>
) : null}
to {payees.length} {payees.length > 1 ? "winners" : "winner"}
</span>
</div>
) : currentPaidToken ? (
Expand Down
15 changes: 10 additions & 5 deletions packages/react-app-revamp/layouts/LayoutViewContest/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -202,17 +202,22 @@ const LayoutViewContest = ({ children }: { children: React.ReactNode }) => {
)}
<div className="animate-reveal pt-3 md:pt-0">
<div className="flex flex-col mt-6 md:mt-10 gap-4">
<ContestName contestName={contestName} address={address} chainName={chainName} />
<div className="flex flex-col gap-2">
{isMobile && rewardsModuleAddress && rewardsAbi ? (
<div className="w-2/3">
<ContestRewardsInfo rewardsModuleAddress={rewardsModuleAddress} rewardsAbi={rewardsAbi} />
</div>
) : null}
<ContestName contestName={contestName} address={address} chainName={chainName} />
</div>

<div
className={`flex flex-row ${rewardsModuleAddress && rewardsAbi ? "justify-between" : "gap-3"} md:justify-normal md:gap-4 items-center`}
>
<div className={`flex flex-row gap-3 md:gap-4 items-center`}>
<UserProfileDisplay
ethereumAddress={contestAuthorEthereumAddress}
shortenOnFallback
textualVersion={isMobile}
/>
{rewardsModuleAddress && rewardsAbi ? (
{!isMobile && rewardsModuleAddress && rewardsAbi ? (
<ContestRewardsInfo rewardsModuleAddress={rewardsModuleAddress} rewardsAbi={rewardsAbi} />
) : null}
{isMobile ? (
Expand Down

0 comments on commit 834d85a

Please sign in to comment.