Skip to content

Commit

Permalink
chore: Update ESLint configuration and MainRewards component
Browse files Browse the repository at this point in the history
- Update .eslintrc.json to extend "next/core-web-vitals" and add plugins
- Update MainRewards.tsx to import Title from antd/es/typography/Title
- Remove unused imports and refactor code in MainRewards.tsx
- Add ConfettiAnimation component to MainRewards.tsx
  • Loading branch information
truemiller committed Jul 17, 2024
1 parent 4b3332c commit 330f3d8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
26 changes: 11 additions & 15 deletions frontend/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,23 @@
{
"extends": [
"next/core-web-vitals"
],
"extends": ["next/core-web-vitals"],
"globals": {
"JSX": true,
"React": true
},
"plugins": [
"prettier",
"unused-imports",
"simple-import-sort",
"import"
],
"plugins": ["prettier", "unused-imports", "simple-import-sort", "import"],
"rules": {
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error",
"unused-imports/no-unused-imports": "error",
"no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }],
"no-console": "warn",
"prettier/prettier": ["error", {
"endOfLine": "auto",
"semi": true,
"singleQuote": true
}]
"prettier/prettier": [
"error",
{
"endOfLine": "auto",
"semi": true,
"singleQuote": true
}
]
}
}
}
8 changes: 6 additions & 2 deletions frontend/components/Main/MainRewards.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
import { InfoCircleOutlined } from '@ant-design/icons';
import { Button, Flex, Modal, Skeleton, Tag, Tooltip, Typography } from 'antd';
import Title from 'antd/es/typography/Title';
import Image from 'next/image';
import { useCallback, useEffect, useRef, useState } from 'react';
import { useCallback, useEffect, useState } from 'react';

import { useBalance } from '@/hooks/useBalance';
import { useElectronApi } from '@/hooks/useElectronApi';
import { useReward } from '@/hooks/useReward';
import { useStore } from '@/hooks/useStore';
import { balanceFormat } from '@/utils/numberFormatters';

import { ConfettiAnimation } from '../Confetti/ConfettiAnimation';
import { CardSection } from '../styled/CardSection';

const { Text, Paragraph } = Typography;
Expand All @@ -18,7 +22,7 @@ const Loader = () => (
</Flex>
);

export const MainRewards = () => {
export const DisplayRewards = () => {
const { availableRewardsForEpochEth, isEligibleForRewards } = useReward();
const { isBalanceLoaded } = useBalance();

Expand Down

0 comments on commit 330f3d8

Please sign in to comment.