Skip to content

Commit

Permalink
fix: choose account padding
Browse files Browse the repository at this point in the history
  • Loading branch information
fbwoolf committed May 3, 2022
1 parent feebd62 commit 13d091e
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 29 deletions.
5 changes: 3 additions & 2 deletions src/app/pages/choose-account/choose-account.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { useWallet } from '@app/common/hooks/use-wallet';
import { useAppDetails } from '@app/common/hooks/auth/use-app-details';
import { Header } from '@app/components/header';
import { Accounts } from '@app/pages/choose-account/components/accounts';
import { POPUP_CENTER_WIDTH } from '@shared/constants';

export const ChooseAccount = memo(() => {
const { name: appName } = useAppDetails();
Expand All @@ -25,8 +26,8 @@ export const ChooseAccount = memo(() => {
}, [handleUnmount]);

return (
<Flex flexDirection="column" px={['loose', 'unset']} width="100%">
<Stack spacing="loose" textAlign="center">
<Flex alignItems="center" flexDirection="column" px="loose" width="100%">
<Stack minWidth={`${POPUP_CENTER_WIDTH}px`} spacing="loose" textAlign="center">
<AppIcon mt="extra-loose" mb="loose" size="72px" />
<Stack spacing="base">
<Title fontSize={4}>Choose an account</Title>
Expand Down
3 changes: 2 additions & 1 deletion src/app/pages/choose-account/components/accounts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
import { slugify } from '@app/common/utils';
import { useAccounts, useHasCreatedAccount } from '@app/store/accounts/account.hooks';
import { useAddressBalances } from '@app/query/balance/balance.hooks';
import { POPUP_CENTER_WIDTH } from '@shared/constants';

const loadingProps = { color: '#A1A7B3' };
const getLoadingProps = (loading: boolean) => (loading ? loadingProps : {});
Expand Down Expand Up @@ -150,7 +151,7 @@ export const Accounts = memo(() => {
return (
<>
<AddAccountAction />
<Box mt="base">
<Box minWidth={`${POPUP_CENTER_WIDTH}px`} mt="base" px="loose">
<Virtuoso
useWindowScroll
data={accounts}
Expand Down
54 changes: 28 additions & 26 deletions src/app/pages/transaction-request/transaction-request.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { memo, useCallback, useEffect } from 'react';
import { Formik } from 'formik';
import * as yup from 'yup';
import { Stack } from '@stacks/ui';
import { Flex, Stack } from '@stacks/ui';

import { useRouteHeader } from '@app/common/hooks/use-route-header';
import { useFeeSchema } from '@app/common/validation/use-fee-schema';
Expand Down Expand Up @@ -88,31 +88,33 @@ function TransactionRequestBase(): JSX.Element | null {
if (!transactionRequest) return null;

return (
<Stack px='loose' spacing="loose">
<PageTop />
<PostConditionModeWarning />
<TransactionError />
<PostConditions />
{transactionRequest.txType === 'contract_call' && <ContractCallDetails />}
{transactionRequest.txType === 'token_transfer' && <StxTransferDetails />}
{transactionRequest.txType === 'smart_contract' && <ContractDeployDetails />}
<Formik
initialValues={{ fee: '', feeType: Estimations[Estimations.Middle] }}
onSubmit={onSubmit}
validateOnChange={false}
validateOnBlur={false}
validateOnMount={false}
validationSchema={validationSchema}
>
{() => (
<>
<FeeForm />
<SubmitAction />
<HighFeeDrawer />
</>
)}
</Formik>
</Stack>
<Flex alignItems="center" flexDirection="column" width="100%">
<Stack px="loose" spacing="loose">
<PageTop />
<PostConditionModeWarning />
<TransactionError />
<PostConditions />
{transactionRequest.txType === 'contract_call' && <ContractCallDetails />}
{transactionRequest.txType === 'token_transfer' && <StxTransferDetails />}
{transactionRequest.txType === 'smart_contract' && <ContractDeployDetails />}
<Formik
initialValues={{ fee: '', feeType: Estimations[Estimations.Middle] }}
onSubmit={onSubmit}
validateOnChange={false}
validateOnBlur={false}
validateOnMount={false}
validationSchema={validationSchema}
>
{() => (
<>
<FeeForm />
<SubmitAction />
<HighFeeDrawer />
</>
)}
</Formik>
</Stack>
</Flex>
);
}

Expand Down

0 comments on commit 13d091e

Please sign in to comment.