Skip to content

Commit

Permalink
chore: fix borrow page warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
decebal committed Nov 17, 2024
1 parent 5ea32d2 commit e1745bd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 7 additions & 4 deletions packages/nextjs/app/borrow/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { useAccount } from "wagmi";
import { SkipTimeComponent } from "~~/components/dev/SkipTimeComponent";
import { useScaffoldWriteContract } from "~~/hooks/scaffold-eth";
import { useAgreements } from "~~/hooks/useAgreements";
import { notification } from "~~/utils/scaffold-eth";

export default function BorrowPage() {
const { address: connectedAddress } = useAccount();
Expand All @@ -26,13 +27,14 @@ export default function BorrowPage() {
args: [id as unknown as bigint],
value: monthlyPayment,
});
alert("Agreement started successfully!");
notification.success("Agreement started successfully!");
reloadAgreements();
} catch (e) {
console.log({ e });
alert("Failed to start agreement. Please try again.");
notification.error("Failed to start agreement. Please try again.");
}
},
// eslint-disable-next-line react-hooks/exhaustive-deps
[agreements, reloadAgreements],
);

Expand All @@ -44,13 +46,14 @@ export default function BorrowPage() {
args: [id as unknown as bigint],
value: monthlyPayment,
});
alert("Payment made successfully!");
notification.success("Payment made successfully!");
reloadAgreements();
} catch (e) {
console.log({ e });
alert("Failed to make payment. Please try again.");
notification.error("Failed to make payment. Please try again.");
}
},
// eslint-disable-next-line react-hooks/exhaustive-deps
[agreements, reloadAgreements],
);

Expand Down
2 changes: 0 additions & 2 deletions packages/nextjs/components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ import React from "react";
import Link from "next/link";
import { hardhat } from "viem/chains";
import { CurrencyDollarIcon, MagnifyingGlassIcon } from "@heroicons/react/24/outline";
import { HeartIcon } from "@heroicons/react/24/outline";
import { SwitchTheme } from "~~/components/SwitchTheme";
import { BuidlGuidlLogo } from "~~/components/assets/BuidlGuidlLogo";
import { Faucet } from "~~/components/scaffold-eth";
import { useTargetNetwork } from "~~/hooks/scaffold-eth/useTargetNetwork";
import { useGlobalState } from "~~/services/store/store";
Expand Down

0 comments on commit e1745bd

Please sign in to comment.