Skip to content

Commit 18aa851

Browse files
Merge pull request #70 from StabilityNexus/Frontend
Linter error fixes
2 parents c6629e4 + decead8 commit 18aa851

4 files changed

Lines changed: 8 additions & 11 deletions

File tree

web/src/app/create/page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use client";
22

3-
import { useState, useEffect } from "react";
3+
import { useState, useEffect, useCallback } from "react";
44
import Layout from "@/components/Layout";
55
import { Button } from "@/components/ui/button";
66
import { Label } from "@/components/ui/label";
@@ -144,11 +144,11 @@ export default function CreateCAT() {
144144
return history ? JSON.parse(history) : [];
145145
};
146146

147-
const saveTransaction = (txDetails: object) => {
147+
const saveTransaction = useCallback((txDetails: object) => {
148148
const history = getTransactionHistory();
149149
history.push(txDetails);
150150
localStorage.setItem("transactionHistory", JSON.stringify(history));
151-
};
151+
}, []);
152152

153153
const deployContract = async () => {
154154
try {

web/src/app/my-cats/page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ export default function MyCATsPage() {
258258
console.error("Error fetching creator CATs:", error);
259259
return [];
260260
}
261-
}, [address, fetchCATDetails]);
261+
}, [address]);
262262

263263
const fetchMinterCATs = useCallback(async (startIndex: number, endIndex: number): Promise<CatDetails[]> => {
264264
if (!address) return [];
@@ -316,7 +316,7 @@ export default function MyCATsPage() {
316316
console.error("Error fetching minter CATs:", error);
317317
return [];
318318
}
319-
}, [address, fetchCATDetails]);
319+
}, [address]);
320320

321321
// Helper function to add delays between requests
322322
const delay = (ms: number) => new Promise(resolve => setTimeout(resolve, ms));
@@ -426,7 +426,7 @@ export default function MyCATsPage() {
426426
console.error("Error fetching CAT details:", error);
427427
return [];
428428
}
429-
}, [fetchTokenDetails]);
429+
}, []);
430430

431431
// Initialize pagination and load first page
432432
const initializePagination = useCallback(async () => {

web/src/app/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export default function Home() {
8383

8484
router.push(`/c?vault=${catAddress}&chainId=${selectedChain}`);
8585
setShowPopup(false);
86-
} catch (error) {
86+
} catch {
8787
showTransactionToast({
8888
hash: "0x0" as `0x${string}`,
8989
chainId: Number(selectedChain),

web/src/components/ui/input.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@ import * as React from "react"
22

33
import { cn } from "@/lib/utils"
44

5-
export interface InputProps
6-
extends React.InputHTMLAttributes<HTMLInputElement> { }
7-
8-
const Input = React.forwardRef<HTMLInputElement, InputProps>(
5+
const Input = React.forwardRef<HTMLInputElement, React.InputHTMLAttributes<HTMLInputElement>>(
96
({ className, type, ...props }, ref) => {
107
return (
118
<input

0 commit comments

Comments
 (0)