From 12bde8e7f8a1e04a4211edb9fa6ab24cd05329d0 Mon Sep 17 00:00:00 2001 From: David Colon <38386583+Da-Colon@users.noreply.github.com> Date: Mon, 11 Mar 2024 14:59:49 -0400 Subject: [PATCH] prettier ran --- global.d.ts | 2 +- index.html | 17 ++++++----- .../Activity/ActivityGovernance.tsx | 2 +- src/components/ProposalTemplates/index.tsx | 2 +- src/components/Proposals/ProposalsList.tsx | 2 +- .../pages/DaoDashboard/Info/ParentLink.tsx | 2 +- src/components/ui/cards/DAOInfoCard.tsx | 2 +- src/components/ui/containers/InfoBox.tsx | 2 +- src/components/ui/icons/IconWithText.tsx | 2 +- .../modals/ConfirmModifyGovernanceModal.tsx | 2 +- src/components/ui/page/Header/Breadcrumbs.tsx | 2 +- src/components/ui/page/Header/index.tsx | 28 +++++++++---------- .../ui/page/Navigation/NavigationLink.tsx | 2 +- src/components/ui/page/Navigation/index.tsx | 2 +- src/hooks/DAO/useDAOController.ts | 2 +- src/pages/DAOController.tsx | 12 ++++++-- src/pages/daos/[daoAddress]/new/index.tsx | 12 ++++---- .../[daoAddress]/proposal-templates/index.tsx | 2 +- .../daos/[daoAddress]/proposals/index.tsx | 2 +- .../NetworkConfig/rainbow-kit.config.ts | 5 +++- src/providers/Providers.tsx | 4 +-- src/router.tsx | 2 +- tsconfig.json | 12 ++------ vite.config.mts | 6 ++-- 24 files changed, 66 insertions(+), 62 deletions(-) diff --git a/global.d.ts b/global.d.ts index 2361dd89e7..c13c728351 100644 --- a/global.d.ts +++ b/global.d.ts @@ -5,6 +5,6 @@ export {}; declare global { interface Window { hj: ((...params: any[]) => void) & { q: [string, any[]][] }; - _hjSettings: { hjid: number; hjsv: number; }; + _hjSettings: { hjid: number; hjsv: number }; } } diff --git a/index.html b/index.html index a2f59c601c..bc787b571f 100644 --- a/index.html +++ b/index.html @@ -1,7 +1,7 @@ - +
- + diff --git a/src/components/Activity/ActivityGovernance.tsx b/src/components/Activity/ActivityGovernance.tsx index 657643ebb6..812ec81667 100644 --- a/src/components/Activity/ActivityGovernance.tsx +++ b/src/components/Activity/ActivityGovernance.tsx @@ -1,7 +1,7 @@ import { Flex } from '@chakra-ui/react'; import { format } from 'date-fns'; import { useTranslation } from 'react-i18next'; -import { Link } from "react-router-dom"; +import { Link } from 'react-router-dom'; import { DAO_ROUTES } from '../../constants/routes'; import { useFractal } from '../../providers/App/AppProvider'; import { FractalProposal, ActivityEventType, SnapshotProposal } from '../../types'; diff --git a/src/components/ProposalTemplates/index.tsx b/src/components/ProposalTemplates/index.tsx index 16b5c57143..c20e69f5d8 100644 --- a/src/components/ProposalTemplates/index.tsx +++ b/src/components/ProposalTemplates/index.tsx @@ -1,6 +1,6 @@ import { Flex, Box, Button } from '@chakra-ui/react'; import { useTranslation } from 'react-i18next'; -import { Link } from "react-router-dom"; +import { Link } from 'react-router-dom'; import { DAO_ROUTES } from '../../constants/routes'; import useSubmitProposal from '../../hooks/DAO/proposal/useSubmitProposal'; import { useFractal } from '../../providers/App/AppProvider'; diff --git a/src/components/Proposals/ProposalsList.tsx b/src/components/Proposals/ProposalsList.tsx index 89572c7b76..f180efc871 100644 --- a/src/components/Proposals/ProposalsList.tsx +++ b/src/components/Proposals/ProposalsList.tsx @@ -1,6 +1,6 @@ import { Button, Box, Flex } from '@chakra-ui/react'; import { useTranslation } from 'react-i18next'; -import { Link } from "react-router-dom"; +import { Link } from 'react-router-dom'; import { DAO_ROUTES } from '../../constants/routes'; import useSubmitProposal from '../../hooks/DAO/proposal/useSubmitProposal'; import { useFractal } from '../../providers/App/AppProvider'; diff --git a/src/components/pages/DaoDashboard/Info/ParentLink.tsx b/src/components/pages/DaoDashboard/Info/ParentLink.tsx index 639909fae1..0a9d4b4fa9 100644 --- a/src/components/pages/DaoDashboard/Info/ParentLink.tsx +++ b/src/components/pages/DaoDashboard/Info/ParentLink.tsx @@ -1,6 +1,6 @@ import { Link, HStack, Image, Text } from '@chakra-ui/react'; import { useTranslation } from 'react-i18next'; -import { Link as RouterLink } from "react-router-dom"; +import { Link as RouterLink } from 'react-router-dom'; import { DAO_ROUTES } from '../../../../constants/routes'; import { useFractal } from '../../../../providers/App/AppProvider'; diff --git a/src/components/ui/cards/DAOInfoCard.tsx b/src/components/ui/cards/DAOInfoCard.tsx index c918e52ab1..f5d6ca5c8a 100644 --- a/src/components/ui/cards/DAOInfoCard.tsx +++ b/src/components/ui/cards/DAOInfoCard.tsx @@ -1,5 +1,5 @@ import { Box, Flex, Text, Spacer, HStack, FlexProps, Link, Center } from '@chakra-ui/react'; -import { Link as RouterLink } from "react-router-dom"; +import { Link as RouterLink } from 'react-router-dom'; import { DAO_ROUTES } from '../../../constants/routes'; import useDisplayName from '../../../hooks/utils/useDisplayName'; import { useFractal } from '../../../providers/App/AppProvider'; diff --git a/src/components/ui/containers/InfoBox.tsx b/src/components/ui/containers/InfoBox.tsx index 54bb9eabe3..e4b2bdaa2d 100644 --- a/src/components/ui/containers/InfoBox.tsx +++ b/src/components/ui/containers/InfoBox.tsx @@ -27,7 +27,7 @@ export function InfoBox({ onClick={ to ? () => { - navigate(to); + navigate(to); } : undefined } diff --git a/src/components/ui/icons/IconWithText.tsx b/src/components/ui/icons/IconWithText.tsx index 9daa419ca1..247893c75a 100644 --- a/src/components/ui/icons/IconWithText.tsx +++ b/src/components/ui/icons/IconWithText.tsx @@ -1,4 +1,4 @@ -import { Link , HStack, Text } from '@chakra-ui/react'; +import { Link, HStack, Text } from '@chakra-ui/react'; import { ReactNode } from 'react'; interface IconWithTextProps { diff --git a/src/components/ui/modals/ConfirmModifyGovernanceModal.tsx b/src/components/ui/modals/ConfirmModifyGovernanceModal.tsx index e6cb682e73..bd0be0f7d1 100644 --- a/src/components/ui/modals/ConfirmModifyGovernanceModal.tsx +++ b/src/components/ui/modals/ConfirmModifyGovernanceModal.tsx @@ -1,6 +1,6 @@ import { Box, Button, Divider, Text } from '@chakra-ui/react'; import { useTranslation } from 'react-i18next'; -import { Link } from "react-router-dom"; +import { Link } from 'react-router-dom'; import { DAO_ROUTES } from '../../../constants/routes'; import { useFractal } from '../../../providers/App/AppProvider'; diff --git a/src/components/ui/page/Header/Breadcrumbs.tsx b/src/components/ui/page/Header/Breadcrumbs.tsx index f1f21c9509..1c642e2bbd 100644 --- a/src/components/ui/page/Header/Breadcrumbs.tsx +++ b/src/components/ui/page/Header/Breadcrumbs.tsx @@ -1,4 +1,4 @@ -import { Link , Breadcrumb, BreadcrumbItem, BreadcrumbLink, Text } from '@chakra-ui/react'; +import { Link, Breadcrumb, BreadcrumbItem, BreadcrumbLink, Text } from '@chakra-ui/react'; export type Crumb = { terminus: string; diff --git a/src/components/ui/page/Header/index.tsx b/src/components/ui/page/Header/index.tsx index 4175ab82f2..1b6595da76 100644 --- a/src/components/ui/page/Header/index.tsx +++ b/src/components/ui/page/Header/index.tsx @@ -5,25 +5,25 @@ import { FavoritesMenu } from '../../menus/FavoritesMenu'; function Header() { return ( + + + + - - - - - - - + + + ); } diff --git a/src/components/ui/page/Navigation/NavigationLink.tsx b/src/components/ui/page/Navigation/NavigationLink.tsx index 6adddf0db1..9818af6f66 100644 --- a/src/components/ui/page/Navigation/NavigationLink.tsx +++ b/src/components/ui/page/Navigation/NavigationLink.tsx @@ -1,7 +1,7 @@ import { Box, ComponentWithAs, Hide, IconProps, Text } from '@chakra-ui/react'; import { useCallback } from 'react'; import { useTranslation } from 'react-i18next'; -import { Link, useMatch } from "react-router-dom"; +import { Link, useMatch } from 'react-router-dom'; import { NavigationTooltip } from './NavigationTooltip'; interface INavigationLink { diff --git a/src/components/ui/page/Navigation/index.tsx b/src/components/ui/page/Navigation/index.tsx index 2b2a3de0f2..e83bec9175 100644 --- a/src/components/ui/page/Navigation/index.tsx +++ b/src/components/ui/page/Navigation/index.tsx @@ -14,7 +14,7 @@ import { import { FractalBrandBurger, FractalBrand } from '@decent-org/fractal-ui'; import React from 'react'; import { useTranslation } from 'react-i18next'; -import { Link } from "react-router-dom"; +import { Link } from 'react-router-dom'; import { BASE_ROUTES } from '../../../../constants/routes'; import { useFractal } from '../../../../providers/App/AppProvider'; import { DAOSearch } from '../../menus/DAOSearch'; diff --git a/src/hooks/DAO/useDAOController.ts b/src/hooks/DAO/useDAOController.ts index 996a16b9d2..568f4e92b6 100644 --- a/src/hooks/DAO/useDAOController.ts +++ b/src/hooks/DAO/useDAOController.ts @@ -11,7 +11,7 @@ import { useFractalTreasury } from './loaders/useFractalTreasury'; import { useGovernanceContracts } from './loaders/useGovernanceContracts'; export default function useDAOController() { - const {daoAddress} = useParams(); + const { daoAddress } = useParams(); const { node: { nodeHierarchy: { parentAddress }, diff --git a/src/pages/DAOController.tsx b/src/pages/DAOController.tsx index 20e87ec721..fa5c825a59 100644 --- a/src/pages/DAOController.tsx +++ b/src/pages/DAOController.tsx @@ -89,7 +89,11 @@ export default function DAOController() { const validSafe = node.safe; let display; - const childrenDisplay = ; + const childrenDisplay = ( + + + + ); if (import.meta.env.VITE_APP_TESTING_ENVIRONMENT) { display = childrenDisplay; @@ -113,7 +117,11 @@ export default function DAOController() { } return ( <> - {node?.daoName ? `${node.daoName} | ${import.meta.env.VITE_APP_NAME}` : import.meta.env.VITE_APP_NAME} + + {node?.daoName + ? `${node.daoName} | ${import.meta.env.VITE_APP_NAME}` + : import.meta.env.VITE_APP_NAME} + {display} ); diff --git a/src/pages/daos/[daoAddress]/new/index.tsx b/src/pages/daos/[daoAddress]/new/index.tsx index 7d815fa951..60fc92e25b 100644 --- a/src/pages/daos/[daoAddress]/new/index.tsx +++ b/src/pages/daos/[daoAddress]/new/index.tsx @@ -27,11 +27,11 @@ export default function SubDaoCreate() { }; return ( - + ); } diff --git a/src/pages/daos/[daoAddress]/proposal-templates/index.tsx b/src/pages/daos/[daoAddress]/proposal-templates/index.tsx index 385d2a090d..12e72080c4 100644 --- a/src/pages/daos/[daoAddress]/proposal-templates/index.tsx +++ b/src/pages/daos/[daoAddress]/proposal-templates/index.tsx @@ -1,7 +1,7 @@ import { Button, Show } from '@chakra-ui/react'; import { AddPlus } from '@decent-org/fractal-ui'; import { useTranslation } from 'react-i18next'; -import { Link } from "react-router-dom"; +import { Link } from 'react-router-dom'; import ProposalTemplates from '../../../../components/ProposalTemplates'; import PageHeader from '../../../../components/ui/page/Header/PageHeader'; import { DAO_ROUTES } from '../../../../constants/routes'; diff --git a/src/pages/daos/[daoAddress]/proposals/index.tsx b/src/pages/daos/[daoAddress]/proposals/index.tsx index 6884041511..97c284b22b 100644 --- a/src/pages/daos/[daoAddress]/proposals/index.tsx +++ b/src/pages/daos/[daoAddress]/proposals/index.tsx @@ -2,7 +2,7 @@ import { Button, Flex, Show, Text } from '@chakra-ui/react'; import { AddPlus, TokenPlaceholder } from '@decent-org/fractal-ui'; import { useMemo } from 'react'; import { useTranslation } from 'react-i18next'; -import { Link } from "react-router-dom"; +import { Link } from 'react-router-dom'; import Proposals from '../../../../components/Proposals'; import { ModalType } from '../../../../components/ui/modals/ModalProvider'; import { useFractalModal } from '../../../../components/ui/modals/useFractalModal'; diff --git a/src/providers/NetworkConfig/rainbow-kit.config.ts b/src/providers/NetworkConfig/rainbow-kit.config.ts index 3a5c34d981..8001a3978c 100644 --- a/src/providers/NetworkConfig/rainbow-kit.config.ts +++ b/src/providers/NetworkConfig/rainbow-kit.config.ts @@ -43,7 +43,10 @@ export const { chains, publicClient } = configureChains(supportedWagmiChains, [ }), ]); -const defaultWallets = [injectedWallet({ chains }), coinbaseWallet({ appName: import.meta.env.VITE_APP_NAME, chains })]; +const defaultWallets = [ + injectedWallet({ chains }), + coinbaseWallet({ appName: import.meta.env.VITE_APP_NAME, chains }), +]; if (import.meta.env.VITE_APP_WALLET_CONNECT_PROJECT_ID) { defaultWallets.push( diff --git a/src/providers/Providers.tsx b/src/providers/Providers.tsx index 85f51a6e55..8016729cf1 100644 --- a/src/providers/Providers.tsx +++ b/src/providers/Providers.tsx @@ -41,9 +41,7 @@ export default function Providers({ children }: { children: ReactNode }) { newestOnTop={false} pauseOnFocusLoss={false} /> - - {children} - + {children} diff --git a/src/router.tsx b/src/router.tsx index e68f658ba8..ed72c36922 100644 --- a/src/router.tsx +++ b/src/router.tsx @@ -89,7 +89,7 @@ export const router = createBrowserRouter([ { path: '*', // 404 element: , - } + }, ], }, ]); diff --git a/tsconfig.json b/tsconfig.json index f98a40a76c..af293423ed 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -15,16 +15,8 @@ "isolatedModules": true, "noEmit": true, "jsx": "preserve", - "incremental": true, + "incremental": true }, "exclude": ["docker"], - "include": [ - "src", - "tests", - "test", - "app", - "netlify/functions", - "vite.config.mts", - "global.d.ts", - ] + "include": ["src", "tests", "test", "app", "netlify/functions", "vite.config.mts", "global.d.ts"] } diff --git a/vite.config.mts b/vite.config.mts index c019226d37..a9069fc6d5 100644 --- a/vite.config.mts +++ b/vite.config.mts @@ -1,6 +1,6 @@ -import react from "@vitejs/plugin-react-swc"; -import { defineConfig } from "vite"; -import { nodePolyfills } from 'vite-plugin-node-polyfills' +import react from '@vitejs/plugin-react-swc'; +import { defineConfig } from 'vite'; +import { nodePolyfills } from 'vite-plugin-node-polyfills'; // https://vitejs.dev/config/ export default defineConfig({ plugins: [nodePolyfills(), react()],