Skip to content

Commit

Permalink
refactor: remove unused files
Browse files Browse the repository at this point in the history
  • Loading branch information
rndquu committed May 6, 2024
1 parent 5db9383 commit 1f1657b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 159 deletions.
4 changes: 1 addition & 3 deletions packages/dapp/components/layout/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ const Sidebar = () => {
<li>
<hr />
</li>
<Item text="Staking" href="/staking" icon=""></Item>
<Item text="Credits" href="/credits" icon="💸"></Item>
<Item text="Markets" href="/markets" icon="🔁"></Item>
<Item text="Pool" href="/pool" icon="💸"></Item>
</ul>

<ul>
Expand Down
130 changes: 0 additions & 130 deletions packages/dapp/components/utils/local-data.ts

This file was deleted.

27 changes: 1 addition & 26 deletions packages/dapp/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,37 +1,12 @@
import { ethers } from "ethers";
import { FC, useState } from "react";
import { FC } from "react";
import "@uniswap/widgets/fonts.css";

import useProtocolContracts from "@/components/lib/hooks/contracts/use-protocol-contracts";
import useEffectAsync from "@/components/lib/hooks/use-effect-async";
import DollarPrice from "@/components/redeem/dollar-price";
import { fetchData } from "@/components/utils/local-data";

import dynamic from "next/dynamic";
const WalletConnectionWall = dynamic(() => import("@/components/ui/wallet-connection-wall"), { ssr: false }); //@note Fix: (Hydration Error)

const index: FC = (): JSX.Element => {
const [twapPrice, setTwapPrice] = useState<ethers.BigNumber | null>(null);
const protocolContracts = useProtocolContracts();

useEffectAsync(async () => {
if (protocolContracts != null) {
try {
console.log(twapPrice, "priced in ");
} catch (error) {
console.log("Error occurred while executing contract call", error);
setTwapPrice(null);
}
} else {
console.log("protocolContracts is null");
setTwapPrice(null);
}
}, []);

if (process.env.DEBUG === "true") {
fetchData();
}

return (
<WalletConnectionWall>
<DollarPrice />
Expand Down

0 comments on commit 1f1657b

Please sign in to comment.