Skip to content

Commit

Permalink
prettier ran
Browse files Browse the repository at this point in the history
  • Loading branch information
Da-Colon committed Mar 11, 2024
1 parent 0e4602c commit 12bde8e
Show file tree
Hide file tree
Showing 24 changed files with 66 additions and 62 deletions.
2 changes: 1 addition & 1 deletion global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
}
}
17 changes: 10 additions & 7 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!doctype html>
<html lang="en">
<head>
<meta charSet="utf-8" />
<meta charset="utf-8" />
<link
rel="icon"
href="/favicon.ico"
Expand All @@ -17,7 +17,7 @@
/>
<meta
name="git-hash"
content={import.meta.env.VITE_APP_GIT_HASH}
content="{import.meta.env.VITE_APP_GIT_HASH}"
/>
<link
rel="apple-touch-icon"
Expand All @@ -29,7 +29,7 @@
/>
<meta
property="og:url"
content={import.meta.env.VITE_APP_SITE_URL}
content="{import.meta.env.VITE_APP_SITE_URL}"
/>
<meta
property="og:description"
Expand All @@ -41,19 +41,19 @@
/>
<meta
property="og:title"
content={import.meta.env.VITE_APP_NAME}
content="{import.meta.env.VITE_APP_NAME}"
/>
<meta
property="og:image"
content="https://app.fractalframework.xyz/images/hero_image.png"
/>
<meta
property="og:image:alt"
content={import.meta.env.VITE_APP_NAME}
content="{import.meta.env.VITE_APP_NAME}"
/>
<meta
property="og:site_name"
content={import.meta.env.VITE_APP_NAME}
content="{import.meta.env.VITE_APP_NAME}"
/>
<meta
name="viewport"
Expand All @@ -63,6 +63,9 @@
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
<script
type="module"
src="/src/main.tsx"
></script>
</body>
</html>
2 changes: 1 addition & 1 deletion src/components/Activity/ActivityGovernance.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/components/ProposalTemplates/index.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/components/Proposals/ProposalsList.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/components/pages/DaoDashboard/Info/ParentLink.tsx
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/cards/DAOInfoCard.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/containers/InfoBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export function InfoBox({
onClick={
to
? () => {
navigate(to);
navigate(to);
}
: undefined
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/icons/IconWithText.tsx
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/modals/ConfirmModifyGovernanceModal.tsx
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/page/Header/Breadcrumbs.tsx
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
28 changes: 14 additions & 14 deletions src/components/ui/page/Header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,25 @@ import { FavoritesMenu } from '../../menus/FavoritesMenu';

function Header() {
return (
<Flex
h="full"
w="full"
justifyContent="space-between"
pe="0.5rem"
alignItems="center"
>
<Show above="md">
<DAOSearch />
</Show>
<Flex
h="full"
w="full"
justifyContent="space-between"
pe="0.5rem"
alignItems="center"
justifyContent="flex-end"
>
<Show above="md">
<DAOSearch />
</Show>
<Flex
h="full"
w="full"
justifyContent="flex-end"
>
<FavoritesMenu />
<AccountDisplay />
</Flex>
<FavoritesMenu />
<AccountDisplay />
</Flex>
</Flex>
);
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/page/Navigation/NavigationLink.tsx
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/page/Navigation/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/DAO/useDAOController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down
12 changes: 10 additions & 2 deletions src/pages/DAOController.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,11 @@ export default function DAOController() {

const validSafe = node.safe;
let display;
const childrenDisplay = <ChakraProvider theme={activeTheme}><Outlet /></ChakraProvider>;
const childrenDisplay = (
<ChakraProvider theme={activeTheme}>
<Outlet />
</ChakraProvider>
);

if (import.meta.env.VITE_APP_TESTING_ENVIRONMENT) {
display = childrenDisplay;
Expand All @@ -113,7 +117,11 @@ export default function DAOController() {
}
return (
<>
<title>{node?.daoName ? `${node.daoName} | ${import.meta.env.VITE_APP_NAME}` : import.meta.env.VITE_APP_NAME}</title>
<title>
{node?.daoName
? `${node.daoName} | ${import.meta.env.VITE_APP_NAME}`
: import.meta.env.VITE_APP_NAME}
</title>
{display}
</>
);
Expand Down
12 changes: 6 additions & 6 deletions src/pages/daos/[daoAddress]/new/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ export default function SubDaoCreate() {
};

return (
<DaoCreator
pending={pendingCreateTx || redirectPending}
deployDAO={proposeSubDAO}
isSubDAO={true}
mode={DAOCreateMode.SUBDAO}
/>
<DaoCreator
pending={pendingCreateTx || redirectPending}
deployDAO={proposeSubDAO}
isSubDAO={true}
mode={DAOCreateMode.SUBDAO}
/>
);
}
2 changes: 1 addition & 1 deletion src/pages/daos/[daoAddress]/proposal-templates/index.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/pages/daos/[daoAddress]/proposals/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
5 changes: 4 additions & 1 deletion src/providers/NetworkConfig/rainbow-kit.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
4 changes: 1 addition & 3 deletions src/providers/Providers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ export default function Providers({ children }: { children: ReactNode }) {
newestOnTop={false}
pauseOnFocusLoss={false}
/>
<ModalProvider>
{children}
</ModalProvider>
<ModalProvider>{children}</ModalProvider>
</AppProvider>
</EthersContextProvider>
</NetworkConfigProvider>
Expand Down
2 changes: 1 addition & 1 deletion src/router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export const router = createBrowserRouter([
{
path: '*', // 404
element: <FourOhFourPage />,
}
},
],
},
]);
Expand Down
12 changes: 2 additions & 10 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
}
6 changes: 3 additions & 3 deletions vite.config.mts
Original file line number Diff line number Diff line change
@@ -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()],
Expand Down

0 comments on commit 12bde8e

Please sign in to comment.