Skip to content

Commit

Permalink
prepare for Fleek
Browse files Browse the repository at this point in the history
  • Loading branch information
jarbacoa committed May 3, 2022
1 parent 01544d7 commit cd267d7
Show file tree
Hide file tree
Showing 14 changed files with 17 additions and 150 deletions.
12 changes: 6 additions & 6 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
const { i18n } = require("./next-i18next.config");
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
})
const withBundleAnalyzer = require("@next/bundle-analyzer")({
enabled: process.env.ANALYZE === "true",
});

module.exports = withBundleAnalyzer({
/* config options here */
images: {
domains: ["raw.githubusercontent.com", "icons.iconarchive.com", "i.ibb.co"],
loader: 'akamai',
path: '',
},
i18n,
eslint: {
// Warning: Dangerously allow production builds to successfully complete even if
// your project has ESLint errors.
Expand All @@ -31,4 +31,4 @@ module.exports = withBundleAnalyzer({

return config;
},
});
});
31 changes: 11 additions & 20 deletions src/components/pages/Fuse/FusePoolPage/FusePoolPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ const FusePoolPage = memo(() => {
px={isMobile ? 4 : 0}
>
<FuseStatsBar data={data} />

{
/* If they have some asset enabled as collateral, show the collateral ratio bar */
data && data.assets.some((asset) => asset.membership) ? (
Expand All @@ -83,7 +82,6 @@ const FusePoolPage = memo(() => {
/>
) : null
}

{!!data && isAdmin && (
<AdminAlert
isAdmin={isAdmin}
Expand All @@ -103,7 +101,6 @@ const FusePoolPage = memo(() => {
}
/>
)}

<Alert colorScheme={"yellow"} borderRadius={5} mt="5">
<HStack>
<WarningTwoIcon color="darkgoldenrod" mr={2} />
Expand All @@ -114,23 +111,20 @@ const FusePoolPage = memo(() => {
</Text>
</HStack>
</Alert>

<Alert colorScheme={"yellow"} borderRadius={5} mt="5">
<HStack>
<WarningTwoIcon color="darkgoldenrod" mr={2} />
<Text color="black">
{isWarnedComptroller(data?.comptroller) &&
`
Warning: Do not repay your borrows if your collateral is not withdrawable, due to lack of liquidity."
`}{" "}
</Text>
</HStack>
</Alert>

{isWarnedComptroller(data?.comptroller) && (
<Alert colorScheme={"yellow"} borderRadius={5} mt="5">
<HStack>
<WarningTwoIcon color="darkgoldenrod" mr={2} />
<Text color="black">
`Warning: Do not repay your borrows if your collateral is not
withdrawable, due to lack of liquidity. `
</Text>
</HStack>
</Alert>
)}
{!!data && isAuthed && (
<PendingAdminAlert comptroller={data?.comptroller} />
)}

{/*
{!!data && !isWarnedComptroller(data.comptroller) && (
<FuseRewardsBanner
Expand All @@ -139,11 +133,8 @@ const FusePoolPage = memo(() => {
/>
)}
*/}

<FuseUniV3Alert assets={data?.assets ?? []} />

<FuseTabBar />

<RowOrColumn
width="100%"
mainAxisAlignment="flex-start"
Expand Down
9 changes: 0 additions & 9 deletions src/pages/404.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,6 @@ import AppLink from "components/shared/AppLink";
import { Column } from "lib/chakraUtils";
import { NextPage } from "next";

import { serverSideTranslations } from "next-i18next/serverSideTranslations";
export async function getStaticProps({ locale }: { locale: string }) {
return {
props: {
...(await serverSideTranslations(locale)),
},
};
}

const IndexPage: NextPage = () => {
return (
<>
Expand Down
9 changes: 0 additions & 9 deletions src/pages/explore.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
import ExplorePage from "components/pages/ExplorePage";

import { serverSideTranslations } from "next-i18next/serverSideTranslations";
export async function getStaticProps({ locale }: { locale: string }) {
return {
props: {
...(await serverSideTranslations(locale)),
},
};
}

const Explore = () => {
return <ExplorePage />;
};
Expand Down
9 changes: 0 additions & 9 deletions src/pages/fuse/create.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
import { NextPage } from "next";
import FusePoolCreatePage from "components/pages/Fuse/FusePoolCreatePage";
import { serverSideTranslations } from "next-i18next/serverSideTranslations";

export async function getStaticProps({ locale }: { locale: string }) {
return {
props: {
...(await serverSideTranslations(locale)),
},
};
}

const FuseCreatePage: NextPage = () => {
return <FusePoolCreatePage />;
Expand Down
8 changes: 0 additions & 8 deletions src/pages/fuse/index.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
import { NextPage } from "next";
import FusePoolsPage from "components/pages/Fuse/FusePoolsPage/FusePoolsPage";
import { serverSideTranslations } from "next-i18next/serverSideTranslations";

export async function getStaticProps({ locale }: { locale: string }) {
return {
props: {
...(await serverSideTranslations(locale)),
},
};
}

const FusePage: NextPage = () => {
return <FusePoolsPage />;
Expand Down
11 changes: 0 additions & 11 deletions src/pages/fuse/liquidations.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
import { NextPage } from "next";
import FuseLiquidationsPage from "components/pages/Fuse/FuseLiquidationsPage";

import { serverSideTranslations } from "next-i18next/serverSideTranslations";

export async function getStaticProps({ locale }: { locale: string }) {
return {
props: {
...(await serverSideTranslations(locale, ["common"])),
},
};
}


const FusePage: NextPage = () => {
return (
<FuseLiquidationsPage />
Expand Down
15 changes: 0 additions & 15 deletions src/pages/fuse/pool/[poolId]/edit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,6 @@ import { NextPage } from "next";
// Components
import FusePoolEditPage from "components/pages/Fuse/FusePoolEditPage";

import { serverSideTranslations } from "next-i18next/serverSideTranslations";
export async function getStaticProps({ locale }: { locale: string }) {
return {
props: {
...(await serverSideTranslations(locale)),
},
};
}

export const getStaticPaths = async () => {
return {
paths: [],
fallback: "blocking",
};
};``

const FusePoolEditPageNext: NextPage = () => {
return (
Expand Down
18 changes: 0 additions & 18 deletions src/pages/fuse/pool/[poolId]/index.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,6 @@
import { NextPage } from "next";
import FusePoolpage from "components/pages/Fuse/FusePoolPage";

import { serverSideTranslations } from "next-i18next/serverSideTranslations";
import { Heading } from "@chakra-ui/layout";

export async function getStaticProps({ locale }: { locale: string }) {
return {
props: {
...(await serverSideTranslations(locale)),
},
};
}

export const getStaticPaths = async () => {
return {
paths: [],
fallback: "blocking",
};
};

const FusePage: NextPage = () => {
// return <Heading>
return <FusePoolpage />
Expand Down
16 changes: 0 additions & 16 deletions src/pages/fuse/pool/[poolId]/info.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,6 @@ import { NextPage } from "next";
// Components
import FusePoolInfo from "components/pages/Fuse/FusePoolInfoPage";

import { serverSideTranslations } from "next-i18next/serverSideTranslations";
export async function getStaticProps({ locale }: { locale: string }) {
return {
props: {
...(await serverSideTranslations(locale)),
},
};
}

export const getStaticPaths = async () => {
return {
paths: [],
fallback: "blocking",
};
};

const FusePoolInfoPage: NextPage = () => {
return (
<FusePoolInfo />
Expand Down
9 changes: 0 additions & 9 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
import { NextPage } from "next";
import Home from "components/pages/Home/Home";

import { serverSideTranslations } from "next-i18next/serverSideTranslations";
export async function getStaticProps({ locale }: { locale: string }) {
return {
props: {
...(await serverSideTranslations(locale)),
},
};
}

const IndexPage: NextPage = () => {
return (
<>
Expand Down
9 changes: 0 additions & 9 deletions src/pages/turbo/index.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
import { NextPage } from "next";
import TurboIndexPage from "components/pages/Turbo/TurboIndexPage";
import { serverSideTranslations } from "next-i18next/serverSideTranslations";

export async function getStaticProps({ locale }: { locale: string }) {
return {
props: {
...(await serverSideTranslations(locale)),
},
};
}

const Page: NextPage = () => {
return <TurboIndexPage />;
Expand Down
2 changes: 0 additions & 2 deletions src/pages/turbo/safe/[id].tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { NextPage } from "next";
import TurboSafePage from "components/pages/Turbo/TurboSafePage/TurboSafePage";
import { serverSideTranslations } from "next-i18next/serverSideTranslations";
import { useRouter } from "next/router";
import Head from "next/head";
import { chooseBestWeb3Provider } from "utils/web3Providers";
Expand All @@ -23,7 +22,6 @@ export async function getStaticProps({

return {
props: {
...(await serverSideTranslations(locale)),
safeId: id,
symbol,
},
Expand Down
9 changes: 0 additions & 9 deletions src/pages/utils/interest-rates.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
import { NextPage } from "next";
import InterestRates from "components/pages/InterestRates/InterestRates";

import { serverSideTranslations } from "next-i18next/serverSideTranslations";
export async function getStaticProps({ locale }: { locale: string }) {
return {
props: {
...(await serverSideTranslations(locale)),
},
};
}

const Pool2: NextPage = () => {
return (
<>
Expand Down

1 comment on commit cd267d7

@vercel
Copy link

@vercel vercel bot commented on cd267d7 May 3, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.