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

mobile fixes #259

Merged
merged 13 commits into from
Nov 14, 2023
15 changes: 7 additions & 8 deletions frontend/components/table/SignAndClaimRowLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { EcosystemConnectButton } from '@components/EcosystemConnectButton'
import { useCoins } from 'hooks/useCoins'
import { useSignAndClaimRowState } from 'hooks/useSignAndClaimRowState'
import { classNames } from 'utils/classNames'
import { getEcosystemTableLabel } from 'utils/getEcosystemTableLabel'
import { CoinCell } from './CoinCell'
import { Ecosystem } from '@components/Ecosystem'
import { ReactNode } from 'react'
import { EcosystemRowLabel } from './EcosystemRowLabel'

type SignAndClaimRowLayoutProps = {
ecosystem: Ecosystem
Expand All @@ -29,7 +29,7 @@ export function SignAndClaimRowLayout({
<tr className={classNames('border-b border-light-35 ')}>
<td
className={classNames(
'w-full py-2 pl-10 pr-4',
'w-full py-2 pl-4 pr-4 sm:pl-10',
rowDisabled ? 'opacity-25' : ''
)}
>
Expand All @@ -39,18 +39,17 @@ export function SignAndClaimRowLayout({
rowDisabled ? 'pointer-events-none' : ''
)}
>
<span className="min-w-[150px] font-header text-base18 font-thin">
{getEcosystemTableLabel(ecosystem)}
<span className="sm:min-w-[150px]">
<EcosystemRowLabel ecosystem={ecosystem} />
</span>

<span className="flex flex-1 items-center justify-around gap-5">
<span className="mx-2 mr-auto">
<span className="flex items-center justify-around gap-2 sm:flex-1 sm:gap-5">
<span className="mr-auto">
<EcosystemConnectButton
ecosystem={ecosystem}
disableOnConnect={true}
/>
</span>
<span className="mr-auto">{children}</span>
<span className="">{children}</span>
</span>
</div>
</td>
Expand Down
2 changes: 1 addition & 1 deletion frontend/components/wallets/WalletButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export type WalletModalProps = {
export function WalletModal({ openModal, wallets }: WalletModalProps) {
return (
<Modal openModal={openModal}>
<h3 className="mb-16 font-header text-[36px] font-light">
<h3 className="mb-8 font-header text-[24px] font-light sm:mb-16 sm:text-[36px]">
Connect Your Wallet
</h3>
<div className="mx-auto flex max-w-[200px] flex-col justify-around gap-y-4">
Expand Down
76 changes: 37 additions & 39 deletions frontend/sections/ClaimStatus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,48 +46,46 @@ export const ClaimStatus = ({

return (
<Box>
<div className="min-w-[650px]">
<div className="flex items-center justify-between border-b border-light-35 bg-[#242339] py-8 px-10">
<h4 className=" font-header text-[28px] font-light leading-[1.2]">
Sign Your Wallets and Claim
</h4>
<div className="flex gap-4">
<ProceedButton
onProceed={onProceed}
disabled={isProceedDisabled}
tooltipContent={proceedTooltipContent}
/>
</div>
<div className="flex items-center justify-between border-b border-light-35 bg-[#242339] py-4 px-4 sm:py-8 sm:px-10">
<h4 className=" font-header text-[28px] font-light leading-[1.2]">
Sign Your Wallets and Claim
</h4>
<div className="flex gap-4">
<ProceedButton
onProceed={onProceed}
disabled={isProceedDisabled}
tooltipContent={proceedTooltipContent}
/>
</div>
</div>

<table className="">
<tbody>
{Object.values(Ecosystem).map((ecosystem) => (
<SignAndClaimRowLayout ecosystem={ecosystem} key={ecosystem}>
{ecosystemsClaimState?.[ecosystem] !== undefined && (
<ClaimState
ecosystemClaimState={ecosystemsClaimState?.[ecosystem]!}
/>
)}
</SignAndClaimRowLayout>
))}
<tr className="border-b border-light-35 ">
<td className="w-full bg-darkGray5 py-2 pl-10 pr-4">
<div className="flex items-center justify-between">
<span className="font-header text-base18 font-semibold">
Eligible Token Allocation
</span>
</div>
</td>
<td className="min-w-[130px] border-l border-light-35 bg-dark-25">
<span className=" flex min-h-[60px] items-center justify-center gap-1 text-[20px] font-semibold">
{totalGrantedCoins} <Coin />{' '}
<table className="">
<tbody>
{Object.values(Ecosystem).map((ecosystem) => (
<SignAndClaimRowLayout ecosystem={ecosystem} key={ecosystem}>
{ecosystemsClaimState?.[ecosystem] !== undefined && (
<ClaimState
ecosystemClaimState={ecosystemsClaimState?.[ecosystem]!}
/>
)}
</SignAndClaimRowLayout>
))}
<tr className="border-b border-light-35 ">
<td className="w-full bg-darkGray5 py-2 pl-10 pr-4">
<div className="flex items-center justify-between">
<span className="font-header text-base18 font-semibold">
Eligible Token Allocation
</span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</td>
<td className="min-w-[130px] border-l border-light-35 bg-dark-25">
<span className=" flex min-h-[60px] items-center justify-center gap-1 text-[20px] font-semibold">
{totalGrantedCoins} <Coin />{' '}
</span>
</td>
</tr>
</tbody>
</table>
</Box>
)
}
Expand Down
2 changes: 1 addition & 1 deletion frontend/sections/LogInWithSolana.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const LogInWithSolana = ({ onBack, onProceed }: StepProps) => {

return (
<Box>
<div className="flex items-center justify-between border-b border-light-35 bg-[#242339] py-8 px-10">
<div className="flex items-center justify-between border-b border-light-35 bg-[#242339] py-8 px-4 sm:px-10">
<h4 className="font-header text-[28px] font-light leading-[1.2]">
Log in with Solana
</h4>
Expand Down
2 changes: 1 addition & 1 deletion frontend/sections/LoggedInSolana.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const LoggedInSolana = ({ onBack, onProceed }: StepProps) => {

return (
<Box>
<div className="flex items-center justify-between border-b border-light-35 bg-[#242339] py-8 px-10">
<div className="flex items-center justify-between border-b border-light-35 bg-[#242339] py-8 px-4 sm:px-10">
<h4 className="font-header text-[28px] font-light leading-[1.2]">
Log in with Solana
</h4>
Expand Down
2 changes: 1 addition & 1 deletion frontend/sections/SignAndClaim.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ export const SignAndClaim = ({ onBack, onProceed }: SignAndClaimProps) => {
<>
{screen == 1 ? (
<Box>
<div className="flex items-center justify-between border-b border-light-35 bg-[#242339] py-8 px-10">
<div className="flex items-center justify-between border-b border-light-35 bg-[#242339] py-8 px-4 sm:px-10">
<h4 className="font-header text-[28px] font-light leading-[1.2]">
Sign Your Wallets and Claim
</h4>
Expand Down
63 changes: 29 additions & 34 deletions frontend/sections/SignForEligibleWallets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,44 +81,39 @@ export const SignForEligibleWallets = ({

return (
<Box>
<div className="min-w-[650px]">
<div className="flex items-center justify-between border-b border-light-35 bg-[#242339] py-8 px-10">
<h4 className=" font-header text-[28px] font-light leading-[1.2]">
Sign Your Wallets and Claim
</h4>
<div className="flex gap-4">
<BackButton onBack={onBack} />
<ProceedButton
onProceed={onProceed}
disabled={isProceedDisabled}
tooltipContent={proceedTooltipContent}
/>
</div>
<div className="flex items-center justify-between border-b border-light-35 bg-[#242339] py-4 px-4 sm:py-8 sm:px-10">
<h4 className=" font-header text-[28px] font-light leading-[1.2]">
Sign Your Wallets and Claim
</h4>
<div className="flex gap-4">
<BackButton onBack={onBack} />
<ProceedButton
onProceed={onProceed}
disabled={isProceedDisabled}
tooltipContent={proceedTooltipContent}
/>
</div>
</div>

<table className="">
<tbody>
{Object.values(Ecosystem).map((ecosystem) => {
if (
ecosystem === Ecosystem.DISCORD ||
ecosystem === Ecosystem.SOLANA
)
return (
<SignAndClaimRowLayout
ecosystem={ecosystem}
key={ecosystem}
/>
)
<table className="">
<tbody>
{Object.values(Ecosystem).map((ecosystem) => {
if (
ecosystem === Ecosystem.DISCORD ||
ecosystem === Ecosystem.SOLANA
)
return (
<SignAndClaimRowLayout ecosystem={ecosystem} key={ecosystem}>
<EcosystemSignButton ecosystem={ecosystem} />
</SignAndClaimRowLayout>
<SignAndClaimRowLayout ecosystem={ecosystem} key={ecosystem} />
)
})}
<TotalAllocationRow totalGrantedCoins={totalGrantedCoins} />
</tbody>
</table>
</div>
return (
<SignAndClaimRowLayout ecosystem={ecosystem} key={ecosystem}>
<EcosystemSignButton ecosystem={ecosystem} />
</SignAndClaimRowLayout>
)
})}
<TotalAllocationRow totalGrantedCoins={totalGrantedCoins} />
</tbody>
</table>
</Box>
)
}
2 changes: 1 addition & 1 deletion frontend/sections/TokensReceived.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const TokensReceived = ({ totalCoinsClaimed }: TokensReceivedProps) => {
</p>

<div
className="space-between mt-12 flex items-center justify-between
className="space-between mt-12 flex flex-wrap items-center justify-between
gap-4"
>
<div className="flex gap-2">
Expand Down
Loading