Skip to content

Commit

Permalink
Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
mudrila committed Apr 23, 2024
1 parent d159557 commit f852a17
Show file tree
Hide file tree
Showing 25 changed files with 49 additions and 125 deletions.
13 changes: 2 additions & 11 deletions src/components/DaoCreator/formComponents/AzoriusGovernance.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
import {
Alert,
AlertTitle,
Flex,
InputGroup,
InputRightElement,
Text,
} from '@chakra-ui/react';
import { Alert, AlertTitle, Flex, InputGroup, InputRightElement, Text } from '@chakra-ui/react';
import { Info } from '@decent-org/fractal-ui';
import { useTranslation } from 'react-i18next';
import { ICreationStepProps, CreatorSteps, VotingStrategyType } from '../../../types';
Expand Down Expand Up @@ -144,9 +137,7 @@ export function AzoriusGovernance(props: ICreationStepProps) {
</Text>
</AlertTitle>
</Alert>
<Divider
mb={4}
/>
<Divider mb={4} />
<StepButtons
{...props}
prevStep={
Expand Down
10 changes: 2 additions & 8 deletions src/components/DaoCreator/formComponents/AzoriusNFTDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,7 @@ export default function AzoriusNFTDetails(props: ICreationStepProps) {
p={4}
>
<ContentBoxTitle>{t('titleNFTDetails')}</ContentBoxTitle>
<Divider
my="1rem"
/>
<Divider my="1rem" />
{values.erc721Token.nfts.map((nft, i) => {
const nftError = (
errors?.erc721Token?.nfts as FormikErrors<
Expand All @@ -210,11 +208,7 @@ export default function AzoriusNFTDetails(props: ICreationStepProps) {
nft={nft}
hasAddressError={!!addressErrorMessage}
/>
{i < values.erc721Token.nfts.length - 1 && (
<Divider
my="2rem"
/>
)}
{i < values.erc721Token.nfts.length - 1 && <Divider my="2rem" />}
</Fragment>
);
})}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,7 @@ export function EstablishEssentials(props: ICreationStepProps) {
</RadioGroup>
</LabelComponent>
</Box>
<Divider
mb="2rem"
/>
<Divider mb="2rem" />
<LabelComponent
label={t('snapshot')}
helper={t('snapshotHelper')}
Expand All @@ -195,9 +193,7 @@ export function EstablishEssentials(props: ICreationStepProps) {
/>
</LabelWrapper>
</LabelComponent>
<Divider
my="2rem"
/>
<Divider my="2rem" />
<StepButtons
{...props}
isNextDisabled={
Expand Down
17 changes: 3 additions & 14 deletions src/components/DaoCreator/formComponents/GuardDetails.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
import {
Text,
InputGroup,
InputRightElement,
Flex,
Alert,
AlertTitle,
} from '@chakra-ui/react';
import { Text, InputGroup, InputRightElement, Flex, Alert, AlertTitle } from '@chakra-ui/react';
import { Info } from '@decent-org/fractal-ui';
import { useEffect, useState, useCallback } from 'react';
import { useTranslation } from 'react-i18next';
Expand Down Expand Up @@ -258,18 +251,14 @@ function GuardDetails(props: ICreationStepProps) {
</Text>
</AlertTitle>
</Alert>
<Divider
mb={4}
/>
<Divider mb={4} />
{showCustomNonce && (
<>
<CustomNonceInput
nonce={values.multisig.customNonce}
onChange={handleNonceChange}
/>
<Divider
my={4}
/>
<Divider my={4} />
</>
)}
<StepButtons
Expand Down
13 changes: 2 additions & 11 deletions src/components/DaoCreator/formComponents/Multisig.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
import {
Box,
Flex,
Grid,
IconButton,
NumberInput,
NumberInputField,
} from '@chakra-ui/react';
import { Box, Flex, Grid, IconButton, NumberInput, NumberInputField } from '@chakra-ui/react';
import { LabelWrapper, Minus } from '@decent-org/fractal-ui';
import { Field, FieldAttributes } from 'formik';
import { useTranslation } from 'react-i18next';
Expand Down Expand Up @@ -169,9 +162,7 @@ export function Multisig(props: ICreationStepProps) {
</LabelComponent>
</Box>
</Flex>
<Divider
my="2rem"
/>
<Divider my="2rem" />
<StepButtons
{...props}
nextStep={CreatorSteps.FREEZE_DETAILS}
Expand Down
4 changes: 1 addition & 3 deletions src/components/DaoCreator/formComponents/VotesTokenNew.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,7 @@ export function VotesTokenNew(props: ICreationStepProps) {
</LabelComponent>
<Divider />
<AzoriusTokenAllocations {...props} />
<Divider
mb={4}
/>
<Divider mb={4} />
<StepButtons
{...props}
prevStep={CreatorSteps.ESSENTIALS}
Expand Down
18 changes: 14 additions & 4 deletions src/components/ProposalBuilder/ProposalTransaction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export default function ProposalTransaction({
/>
</Box>
)}
<Divider my="1.5rem"/>
<Divider my="1.5rem" />
<Box>
<Text
textStyle="display-lg"
Expand Down Expand Up @@ -329,7 +329,11 @@ export default function ProposalTransaction({
) : undefined
}
isRequired={!!parameter.signature && !parameter.label}
helper={isProposalMode ? t('helperFunctionParameterValue', { ns: 'proposalTemplate'}) : undefined}
helper={
isProposalMode
? t('helperFunctionParameterValue', { ns: 'proposalTemplate' })
: undefined
}
value={parameter.value || ''}
placeholder="100"
onChange={e =>
Expand All @@ -350,13 +354,19 @@ export default function ProposalTransaction({
testId={`transactions.${transactionIndex}.parameters.${i}.value`}
/>
</Box>
<Divider variant="light" my="1rem"/>
<Divider
variant="light"
my="1rem"
/>
</Box>
</Flex>
</AccordionPanel>
</Box>
{!isExpanded && (
<Divider variant="light" mt="0.5rem"/>
<Divider
variant="light"
mt="0.5rem"
/>
)}
{i === transaction.parameters.length - 1 && (
<Button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default function ProposalTransactionsForm(props: ProposalTransactionsForm
setExpandedIndecies={setExpandedIndecies}
{...props}
/>
<Divider my="1.5rem"/>
<Divider my="1.5rem" />
<Button
variant="text"
onClick={() => {
Expand Down
4 changes: 1 addition & 3 deletions src/components/Proposals/ProposalVotes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,7 @@ function ProposalVotes({
{votes.length !== 0 && (
<ContentBox containerBoxProps={{ bg: BACKGROUND_SEMI_TRANSPARENT }}>
<Text textStyle="text-lg-mono-medium">{t('votesTitle', { ns: 'proposal' })}</Text>
<Divider
my={4}
/>
<Divider my={4} />
<Flex
flexWrap="wrap"
gap={4}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,7 @@ export default function SnapshotProposalSummary({ proposal }: ISnapshotProposalS
ShowVotingPowerButton
)}
</Flex>
<Divider
marginTop={4}
/>
<Divider marginTop={4} />
{!!proposal.quorum && (
<Box marginTop={4}>
<QuorumProgressBar
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,7 @@ export default function SnapshotProposalVotes({ proposal }: ISnapshotProposalVot
<Text textStyle="text-lg-mono-medium">
{t('votesTitle')} ({votes.length})
</Text>
<Divider
my={4}
/>
<Divider my={4} />
<Flex
flexWrap="wrap"
gap={4}
Expand Down
4 changes: 1 addition & 3 deletions src/components/Proposals/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,7 @@ export default function Proposals() {
<Text color="grayscale.100">{t('clear', { ns: 'common' })}</Text>
</Button>
</Flex>
<Divider
my={4}
/>
<Divider my={4} />
</Box>
</OptionMenu>
<Sort
Expand Down
4 changes: 1 addition & 3 deletions src/components/pages/AppHome/AppFooter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ export function AppFooter({ ...rest }: BoxProps) {
w="100%"
{...rest}
>
<Divider
paddingTop="2.5rem"
/>
<Divider paddingTop="2.5rem" />
<Flex paddingTop="2rem">
<Text
color="grayscale.500"
Expand Down
4 changes: 1 addition & 3 deletions src/components/pages/DAOTreasury/components/Assets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ function CoinHeader() {
const { t } = useTranslation('treasury');
return (
<Box>
<Divider
my="1.5rem"
/>
<Divider my="1.5rem" />
<HStack marginBottom="0.5rem">
<Text
w="33%"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,7 @@ export default function MetadataContainer() {
width: '100%',
}}
/>
<Divider
my={4}
/>
<Divider my={4} />
<Flex
justifyContent="space-between"
alignItems="center"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,7 @@ export function ModulesContainer() {
<BarLoader />
)}
<Text textStyle="text-lg-mono-bold">{t('guardTitle')}</Text>
<Divider
mt={4}
/>
<Divider mt={4} />
{safe?.guard && safe?.guard !== zeroAddress ? (
<Box>
<DisplayAddress address={safe.guard}>
Expand Down
4 changes: 1 addition & 3 deletions src/components/pages/DaoSettings/components/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ export function SettingsSection({
minWidth="65%"
>
{contentHeader || <Text>{contentTitle}</Text>}
<Divider
marginTop="1rem"
/>
<Divider marginTop="1rem" />
{children}
</StyledBox>
<StyledBox
Expand Down
4 changes: 1 addition & 3 deletions src/components/ui/modals/ConfirmModifyGovernanceModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ export function ConfirmModifyGovernanceModal({ close }: { close: () => void }) {
>
{t('confirmModifyGovernanceDescription')}
</Text>
<Divider
marginBottom="1rem"
/>
<Divider marginBottom="1rem" />
<Text
marginBottom="1rem"
textStyle="text-xl-mono-medium"
Expand Down
4 changes: 1 addition & 3 deletions src/components/ui/modals/ConfirmUrlModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ export function ConfirmUrlModal({ url, close }: { url: string; close: () => void
>
{url}
</Text>
<Divider
marginBottom="1rem"
/>
<Divider marginBottom="1rem" />
<Text marginBottom="1rem">{t('confirmAction')}</Text>
<a
href={url}
Expand Down
4 changes: 1 addition & 3 deletions src/components/ui/modals/DelegateModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,7 @@ export function DelegateModal({ close }: { close: Function }) {
</Text>
</SimpleGrid>
)}
<Divider
marginBottom="1rem"
/>
<Divider marginBottom="1rem" />
<Formik
initialValues={{
address: '',
Expand Down
4 changes: 1 addition & 3 deletions src/components/ui/modals/ForkProposalTemplateModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,7 @@ export default function ForkProposalTemplateModal({
width: '100%',
}}
/>
<Divider
my={4}
/>
<Divider my={4} />
<Button
onClick={handleSubmit}
variant="primary"
Expand Down
14 changes: 2 additions & 12 deletions src/components/ui/modals/ModalBase.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
import {
Flex,
HStack,
Modal,
ModalContent,
ModalOverlay,
Spacer,
Text,
} from '@chakra-ui/react';
import { Flex, HStack, Modal, ModalContent, ModalOverlay, Spacer, Text } from '@chakra-ui/react';
import { Alert, CloseX } from '@decent-org/fractal-ui';
import { ReactNode } from 'react';
import { BACKGROUND_SEMI_TRANSPARENT } from '../../../constants/common';
Expand Down Expand Up @@ -58,9 +50,7 @@ export function ModalBase(props: ModuleBaseProps) {
onClick={props.onClose}
/>
</Flex>
<Divider
marginBottom="1rem"
/>
<Divider marginBottom="1rem" />
{props.children}
</ModalContent>
</Modal>
Expand Down
10 changes: 1 addition & 9 deletions src/components/ui/modals/ProposalTemplateModal.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
import {
Box,
Button,
Flex,
FormControl,
FormLabel,
Switch,
VStack,
} from '@chakra-ui/react';
import { Box, Button, Flex, FormControl, FormLabel, Switch, VStack } from '@chakra-ui/react';
import { useState } from 'react';
import { useTranslation } from 'react-i18next';
import { useNavigate } from 'react-router-dom';
Expand Down
8 changes: 2 additions & 6 deletions src/components/ui/modals/SendAssetsModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,7 @@ export function SendAssetsModal({ close }: { close: () => void }) {
>
{formatUSD(selectedAsset.fiatBalance)}
</Text>
<Divider
my="0.75rem"
/>
<Divider my="0.75rem" />
<LabelWrapper
label={t('destinationLabel')}
subLabel={t('destinationSublabel')}
Expand All @@ -150,9 +148,7 @@ export function SendAssetsModal({ close }: { close: () => void }) {
}}
/>
</LabelWrapper>
<Divider
my="0.75rem"
/>
<Divider my="0.75rem" />
<CustomNonceInput
nonce={nonceInput}
onChange={nonce => setNonceInput(nonce ? nonce : undefined)}
Expand Down
Loading

0 comments on commit f852a17

Please sign in to comment.