Skip to content

Commit

Permalink
Fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
kzlatarov committed Feb 1, 2024
1 parent 728082d commit 6e3efe2
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 33 deletions.
2 changes: 1 addition & 1 deletion packages/ui/app/_components/popup/Swap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ import React, { useEffect, useMemo, useReducer, useState } from 'react';
import { WETHAbi } from 'sdk/dist/cjs/src';
import { getContract } from 'sdk/dist/cjs/src/IonicSdk/utils';
import { useBalance } from 'wagmi';
import type { FetchBalanceResult } from 'wagmi/actions';

import ResultHandler from '../ResultHandler';

import type { TransactionStep } from './TransactionStepHandler';
import TransactionStepsHandler from './TransactionStepHandler';

import { useMultiMidas } from '@ui/context/MultiIonicContext';
import { FetchBalanceResult } from 'wagmi/actions';

export type SwapProps = {
close: () => void;
Expand Down
4 changes: 3 additions & 1 deletion packages/ui/app/_components/popup/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import { useMaxSupplyAmount } from '@ui/hooks/useMaxSupplyAmount';
import { useMaxWithdrawAmount } from '@ui/hooks/useMaxWithdrawAmount';
import { useTotalSupplyAPYs } from '@ui/hooks/useTotalSupplyAPYs';
import type { MarketData } from '@ui/types/TokensDataMap';
import { getBlockTimePerMinuteByChainId } from '@ui/utils/networkData';
import { errorCodeToMessage } from '@ui/utils/errorCodeToMessage';
import { getBlockTimePerMinuteByChainId } from '@ui/utils/networkData';

export enum PopupMode {
SUPPLY = 1,
Expand Down Expand Up @@ -666,6 +666,7 @@ const Popup = ({
}
};

// eslint-disable-next-line
const borrowAmount = async () => {
if (
!transactionSteps.length &&
Expand Down Expand Up @@ -734,6 +735,7 @@ const Popup = ({
}
};

// eslint-disable-next-line
const repayAmount = async () => {
if (
!transactionSteps.length &&
Expand Down
8 changes: 2 additions & 6 deletions packages/ui/app/dashboard/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,9 @@
'use client';

import Link from 'next/link';
import { useSearchParams } from 'next/navigation';

import SupplyRows from '../_components/dashboards/SupplyRows';
export default function Dashboard() {
const searchParams = useSearchParams();
const popmode = searchParams.get('popmode');
const specific = searchParams.get('specific');
const supplyrow = [
{
amount: 168,
Expand Down Expand Up @@ -161,7 +157,7 @@ export default function Dashboard() {
<h3 className={` `}>REWARDS</h3>
</div>
{supplyrow &&
supplyrow.map((val: any, idx: number) => (
supplyrow.map((val, idx: number) => (
<SupplyRows
amount={val.amount}
asset={val.asset}
Expand Down Expand Up @@ -216,7 +212,7 @@ export default function Dashboard() {
<h3 className={` `}>REWARDS</h3>
</div>
{supplyrow &&
supplyrow.map((val: any, idx: number) => (
supplyrow.map((val, idx: number) => (
<SupplyRows
amount={val.amount}
asset={val.asset}
Expand Down
30 changes: 20 additions & 10 deletions packages/ui/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
'use client';
import './globals.css';
// import NextNProgress from "nextjs-progressbar";
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import Link from 'next/link';
import { AppProgressBar as ProgressBar } from 'next-nprogress-bar';
import '@rainbow-me/rainbowkit/styles.css';

import {
darkTheme,
getDefaultWallets,
RainbowKitProvider
} from '@rainbow-me/rainbowkit';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import Image from 'next/image';
import Link from 'next/link';
import { AppProgressBar as ProgressBar } from 'next-nprogress-bar';
import '@rainbow-me/rainbowkit/styles.css';
import { Toaster } from 'react-hot-toast';
import type { Chain } from 'wagmi';
import { configureChains, createClient, WagmiConfig } from 'wagmi';
Expand Down Expand Up @@ -103,10 +103,12 @@ export default function RootLayout({
href={'https://ionic.money'}
target="_blank"
>
<img
<Image
alt="logo"
className={`h-5 `}
height="20"
src="/img/logo/logo.png"
width="20"
/>
</Link>
</div>
Expand All @@ -117,10 +119,12 @@ export default function RootLayout({
href={'https://ionic.money'}
target="_blank"
>
<img
<Image
alt="logo"
className={`h-5 `}
height="20"
src="/images/globe.png"
width="20"
/>
</Link>

Expand All @@ -129,10 +133,12 @@ export default function RootLayout({
href={'https://t.me/ionicmoney'}
target="_blank"
>
<img
<Image
alt="logo"
className={`h-5 `}
height="20"
src="/images/tg.png"
width="20"
/>
</Link>

Expand All @@ -141,10 +147,12 @@ export default function RootLayout({
href={'https://twitter.com/ionicmoney'}
target="_blank"
>
<img
<Image
alt="logo"
className={`h-5 `}
height="20"
src="/images/x.png"
width="20"
/>
</Link>

Expand All @@ -153,10 +161,12 @@ export default function RootLayout({
href={'https://discord.gg/FmgedqR9wn'}
target="_blank"
>
<img
<Image
alt="logo"
className={`h-5 `}
height="20"
src="/images/discord.png"
width="20"
/>
</Link>
</div>
Expand Down
15 changes: 7 additions & 8 deletions packages/ui/app/market/details/[asset]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ import {
donutoptions
} from '../../../_constants/mock';

const data = [
{ name: 'Group A', value: 400 },
{ name: 'Group B', value: 300 },
{ name: 'Group C', value: 300 },
{ name: 'Group D', value: 200 }
];
const COLORS = ['#0088FE', '#00C49F', '#FFBB28', '#FF8042'];
// const data = [
// { name: 'Group A', value: 400 },
// { name: 'Group B', value: 300 },
// { name: 'Group C', value: 300 },
// { name: 'Group D', value: 200 }
// ];
// const COLORS = ['#0088FE', '#00C49F', '#FFBB28', '#FF8042'];

const Asset = ({ params }: IProp) => {
//here we need to make a api to get the data of a certain asset (we can also check the current user with the help of wagmi)
Expand All @@ -73,7 +73,6 @@ const Asset = ({ params }: IProp) => {

const searchParams = useSearchParams();
const info = searchParams.get('info');
const popmode = searchParams.get('popmode');
return (
<div className={`pt-14 pb-10 `}>
<div
Expand Down
1 change: 0 additions & 1 deletion packages/ui/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

import { BigNumber } from 'ethers';
import { formatUnits } from 'ethers/lib/utils.js';
import { useSearchParams } from 'next/navigation';
import { useMemo, useState } from 'react';
import { useChainId } from 'wagmi';

Expand Down
6 changes: 3 additions & 3 deletions packages/ui/app/points/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export default function Points() {
<h3 className={` `}>PERCENTAGE EARNINGS</h3>
</div>
{strategyData &&
strategyData.map((val: any, idx: number) => (
strategyData.map((val, idx: number) => (
<StrategyROW
amount={val.amount}
color={val.color}
Expand Down Expand Up @@ -158,7 +158,7 @@ export default function Points() {
<h3 className={` `}>% EARNINGS</h3>
</div>
{leaderboardData &&
leaderboardData.map((val: any, idx: number) => (
leaderboardData.map((val, idx: number) => (
<ReferralLeaderboard
eid={val.eid}
key={idx}
Expand Down Expand Up @@ -187,7 +187,7 @@ export default function Points() {
<h3 className={` `}>% EARNINGS</h3>
</div>
{leaderboardData &&
leaderboardData.map((val: any, idx: number) => (
leaderboardData.map((val, idx: number) => (
<ReferralLeaderboard
eid={val.eid}
key={idx}
Expand Down
3 changes: 3 additions & 0 deletions packages/ui/hooks/useRewards.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import axios from 'axios';
import { utils } from 'ethers';

// import type { RewardsResponse } from '../pages/api/rewards';
// eslint-disable-next-line @typescript-eslint/no-explicit-any
type RewardsResponse = any;

import { useSdk } from '@ui/hooks/fuse/useSdk';
Expand Down Expand Up @@ -111,11 +112,13 @@ export const fetchRewards = async (
const allRewards = [...pluginRewards];
if (flywheelRewards) {
const flywheelsInPluginResponse = pluginRewards
// eslint-disable-next-line @typescript-eslint/no-explicit-any
.map((pluginReward: any) =>
'flywheel' in pluginReward
? pluginReward.flywheel.toLowerCase()
: null
)
// eslint-disable-next-line @typescript-eslint/no-explicit-any
.filter((f: any) => !!f) as string[];
for (const info of flywheelRewards.rewardsInfo) {
if (
Expand Down
3 changes: 0 additions & 3 deletions packages/ui/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ const nextConfig = {
config.resolve.fallback = { fs: false, net: false, tls: false };
config.externals.push('pino-pretty', 'lokijs', 'encoding');
return config;
},
eslint: {
ignoreDuringBuilds: true
}
};

Expand Down

0 comments on commit 6e3efe2

Please sign in to comment.