Skip to content

Commit

Permalink
fix: scrollbars from padding changes
Browse files Browse the repository at this point in the history
  • Loading branch information
fbwoolf authored and kyranjamie committed May 16, 2022
1 parent 675c8e3 commit 1038ddb
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 33 deletions.
5 changes: 2 additions & 3 deletions src/app/pages/choose-account/choose-account.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ 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 @@ -26,8 +25,8 @@ export const ChooseAccount = memo(() => {
}, [handleUnmount]);

return (
<Flex alignItems="center" flexDirection="column" px="loose" width="100%">
<Stack minWidth={`${POPUP_CENTER_WIDTH}px`} spacing="loose" textAlign="center">
<Flex flexDirection="column" px="loose" width="100%">
<Stack 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: 1 addition & 2 deletions src/app/pages/choose-account/components/accounts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ 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 @@ -151,7 +150,7 @@ export const Accounts = memo(() => {
return (
<>
<AddAccountAction />
<Box minWidth={`${POPUP_CENTER_WIDTH}px`} mt="base" px="loose">
<Box mt="base">
<Virtuoso
useWindowScroll
data={accounts}
Expand Down
54 changes: 26 additions & 28 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 { Flex, Stack } from '@stacks/ui';
import { 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,33 +88,31 @@ function TransactionRequestBase(): JSX.Element | null {
if (!transactionRequest) return null;

return (
<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>
<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>
);
}

Expand Down

0 comments on commit 1038ddb

Please sign in to comment.