Skip to content

Commit

Permalink
chore: modified scripts, linting and format
Browse files Browse the repository at this point in the history
  • Loading branch information
Onizuka-wl committed Sep 30, 2024
1 parent a08415d commit bb1b98c
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 18 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
"start": "next start -p 3000",
"preview": "next start",
"lint": "eslint 'src/**/*.{js,jsx,ts,tsx}'",
"lint:fix": "pnpm run lint -- --fix",
"lint:fix": "pnpm run lint --fix",
"prettier": "prettier src --check",
"prettier:fix": "pnpm run prettier -- --write",
"prettier:fix": "pnpm run prettier --write",
"format": "pnpm run prettier:fix && yarn run lint:fix",
"format:check": "pnpm run prettier && yarn run lint",
"prepare": "husky && wonderland-crypto-husky-checks install",
Expand Down
1 change: 1 addition & 0 deletions src/__tests__/utils.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { expect } from '@jest/globals';

import { truncateAddress } from '../utils/format';

describe('truncateAddress', () => {
Expand Down
1 change: 1 addition & 0 deletions src/components/Theme/muiThemeConfig.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { createTheme } from '@mui/material';

import { Theme, ThemeName } from '~/types';

export const getMuiThemeConfig = (currentTheme: Theme, themeName: ThemeName) => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Theme/rainbowTheme.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import merge from 'lodash.merge';
import { darkTheme, Theme } from '@rainbow-me/rainbowkit';
import merge from 'lodash.merge';

// Configure your rainbowkit custom theme here.
// More info: https://www.rainbowkit.com/docs/custom-theme
Expand Down
8 changes: 4 additions & 4 deletions src/config/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Config } from '~/types';
import { createPublicClient, http } from 'viem';
import { mainnet } from 'viem/chains';

import { getEnv } from './env';
import { getConstants } from './constants';
import { getEnv } from './env';

import { createPublicClient, http } from 'viem';
import { mainnet } from 'viem/chains';
import { Config } from '~/types';

// this provider if for load data when the user is disconnected
export const publicClient = createPublicClient({
Expand Down
2 changes: 1 addition & 1 deletion src/containers/Footer/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { styled } from '@mui/material/styles';
import { useCustomTheme } from '~/hooks/useTheme';

import { useCustomTheme } from '~/hooks/useTheme';
import { FOOTER_HEIGHT } from '~/utils';

export const Footer = () => {
Expand Down
8 changes: 4 additions & 4 deletions src/containers/Header/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { ConnectButton } from '@rainbow-me/rainbowkit';
import { styled } from '@mui/material/styles';
import { IconButton } from '@mui/material';
import LightModeIcon from '@mui/icons-material/LightMode';
import DarkModeIcon from '@mui/icons-material/DarkMode';
import LightModeIcon from '@mui/icons-material/LightMode';
import { IconButton } from '@mui/material';
import { styled } from '@mui/material/styles';
import { ConnectButton } from '@rainbow-me/rainbowkit';

import { useCustomTheme } from '~/hooks/useTheme';
import { zIndex, HEADER_HEIGHT } from '~/utils';
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/ScrollToTop.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useEffect } from 'react';
import { useRouter } from 'next/router';
import { useEffect } from 'react';

export function ScrollToTop() {
const router = useRouter();
Expand Down
1 change: 1 addition & 0 deletions src/hooks/useStateContext.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { useContext } from 'react';

import { StateContext } from '~/providers/StateProvider';

export const useStateContext = () => {
Expand Down
4 changes: 3 additions & 1 deletion src/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { AppProps } from 'next/app';
import { Providers } from '~/providers';

import Layout from './layout';

import { Providers } from '~/providers';

const Home = ({ Component, pageProps }: AppProps) => {
return (
<Providers>
Expand Down
3 changes: 1 addition & 2 deletions src/providers/ThemeProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { ThemeProvider as MuiThemeProvider } from '@mui/material/styles';
import { createContext, useEffect, useMemo, useState } from 'react';

import { ThemeProvider as MuiThemeProvider } from '@mui/material/styles';
import { getMuiThemeConfig } from '~/components';

import { Theme, ThemeName } from '~/types';
import { THEME_KEY, getTheme } from '~/utils';

Expand Down
4 changes: 2 additions & 2 deletions src/utils/config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { connectorsForWallets } from '@rainbow-me/rainbowkit';
import { rainbowWallet, walletConnectWallet, injectedWallet } from '@rainbow-me/rainbowkit/wallets';
import { createConfig, http, cookieStorage, createStorage } from 'wagmi';
import { localhost, sepolia } from 'wagmi/chains';
import { rainbowWallet, walletConnectWallet, injectedWallet } from '@rainbow-me/rainbowkit/wallets';
import { connectorsForWallets } from '@rainbow-me/rainbowkit';

import { getConfig } from '../config';

Expand Down

0 comments on commit bb1b98c

Please sign in to comment.