Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Szegoo committed Sep 19, 2024
1 parent 7c2245c commit 416c514
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
11 changes: 4 additions & 7 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import { useCoretimeApi } from '@/contexts/apis';
import { ApiState } from '@/contexts/apis/types';
import { useNetwork } from '@/contexts/network';
import { useSaleInfo } from '@/contexts/sales';
import { ContextStatus, PurchaseType } from '@/models';
import { PurchaseType } from '@/models';

const Home = () => {
const theme = useTheme();
Expand All @@ -40,7 +40,6 @@ const Home = () => {
state: { decimals, symbol, apiState },
} = useCoretimeApi();
const {
status,
saleInfo: { regionBegin, coresSold, coresOffered },
phase: { currentPrice },
} = useSaleInfo();
Expand Down Expand Up @@ -156,9 +155,7 @@ const Home = () => {
},
];

return apiState !== ApiState.READY ||
loadingBurnInfo ||
loadingPurchaseHistory ? (
return apiState !== ApiState.READY || loadingBurnInfo || loadingPurchaseHistory ? (
<Backdrop open>
<CircularProgress data-cy='loading' />
</Backdrop>
Expand Down Expand Up @@ -277,7 +274,7 @@ const Home = () => {
</Button>
))}
</Stack>
{(
{
<Card sx={{ padding: '1.5rem' }} data-cy='purchase-history-table'>
<Stack direction='column' gap='1rem'>
<Box>
Expand All @@ -291,7 +288,7 @@ const Home = () => {
<PurchaseHistoryTable data={purchaseHistoryData} />
</Stack>
</Card>
)}
}
</Stack>
);
};
Expand Down
9 changes: 3 additions & 6 deletions src/pages/purchase.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import { Backdrop, Box, Button, CircularProgress, Typography, useTheme } from '@mui/material';
import { Box, Button, Typography, useTheme } from '@mui/material';
import { useRouter } from 'next/router';
import { useState } from 'react';

import { useSubmitExtrinsic } from '@/hooks/submitExtrinsic';
import { isNewPricing } from '@/utils/sale';

import {
Balance,
Banner,
CoreDetailsPanel,
ProgressButton,
SaleInfoPanel,
Expand All @@ -21,7 +19,7 @@ import { useNetwork } from '@/contexts/network';
import { useRegions } from '@/contexts/regions';
import { useSaleInfo } from '@/contexts/sales';
import { useToast } from '@/contexts/toast';
import { ContextStatus, SalePhase } from '@/models';
import { SalePhase } from '@/models';

const Purchase = () => {
const theme = useTheme();
Expand All @@ -35,12 +33,11 @@ const Purchase = () => {

const {
saleInfo,
status,
phase: { currentPhase, currentPrice },
fetchSaleInfo,
} = useSaleInfo();
const {
state: { api, apiState, height, symbol, decimals },
state: { api, apiState, symbol, decimals },
} = useCoretimeApi();
const router = useRouter();
const { network } = useNetwork();
Expand Down

0 comments on commit 416c514

Please sign in to comment.