Skip to content

Commit

Permalink
restructure components dir (#210)
Browse files Browse the repository at this point in the history
  • Loading branch information
TopETH authored Aug 9, 2024
1 parent 7613410 commit 1660930
Show file tree
Hide file tree
Showing 53 changed files with 24 additions and 25 deletions.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion src/components/Charts/index.ts

This file was deleted.

4 changes: 1 addition & 3 deletions src/components/Elements/Selectors/NetworkSelector/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
import { useNetwork } from '@/contexts/network';
import { NetworkType } from '@/models';

const RelaySelect = () => {
export const NetworkSelector = () => {
const router = useRouter();
const { network } = useNetwork();

Expand Down Expand Up @@ -84,5 +84,3 @@ const RelaySelect = () => {
</FormControl>
);
};

export default RelaySelect;
1 change: 1 addition & 0 deletions src/components/Elements/Selectors/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export * from './AssetSelector';
export * from './ChainSelector';
export * from './FinalitySelector';
export * from './NetworkSelector';
export * from './RegionSelector';
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,16 @@ import {
} from '@mui/material';
import React, { useState } from 'react';

import {
Address,
NetworkSelector,
ProgressButton,
TxHistoryModal,
} from '@/components';

import { KeyringState, useAccounts } from '@/contexts/account';

import styles from './index.module.scss';
import { Address, ProgressButton } from '../Elements';
import NetworkSelector from '../Elements/Selectors/NetworkSelector';
import { TxHistoryModal } from '../Modals/Accounts';

export const Header = () => {
const theme = useTheme();
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { useNetwork } from '@/contexts/network';
import { RenewIcon } from '@/icons';

import styles from './index.module.scss';
import { StatusIndicator } from '../Elements';
import { StatusIndicator } from '../../Elements';

interface MenuItemProps {
label: string;
Expand Down
4 changes: 2 additions & 2 deletions src/components/Layout/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, { ReactElement } from 'react';

import { Header } from './Header';
import styles from './index.module.scss';
import { Header } from '../Header';
import { Sidebar } from '../Sidebar';
import { Sidebar } from './Sidebar';

interface Props {
children: ReactElement | ReactElement[];
Expand Down
4 changes: 0 additions & 4 deletions src/components/Modals/index.ts

This file was deleted.

File renamed without changes.
1 change: 1 addition & 0 deletions src/components/Orders/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from './Modals';
export * from './OrderCard';
3 changes: 1 addition & 2 deletions src/components/Panels/SaleInfoPanel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ import { useState } from 'react';

import { getBalanceString, getTimeStringShort } from '@/utils/functions';

import { SalePhaseCard } from '@/components/Elements';
import { PriceModal } from '@/components/Modals';
import { PriceModal, SalePhaseCard } from '@/components';

import DollarIcon from '@/assets/dollar.png';
import ListIcon from '@/assets/list.png';
Expand Down
3 changes: 1 addition & 2 deletions src/components/Panels/SalePhaseInfoPanel/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { Box, Button, Paper, Typography, useTheme } from '@mui/material';
import { useEffect, useState } from 'react';

import { CountDown, SalePhaseCard } from '@/components/Elements';
import { PurchaseHistoryModal } from '@/components/Modals';
import { CountDown, PurchaseHistoryModal, SalePhaseCard } from '@/components';

import { useSaleInfo } from '@/contexts/sales';
import { SalePhase } from '@/models';
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions src/components/Paras/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export * from './CoreExpiryCard';
export * from './LeaseStateCard';
export * from './Modals';
export * from './ParaDisplay';
export * from './ParaStateCard';
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ import {
useTheme,
} from '@mui/material';

import { SalePriceChart } from '@/components/Charts';
import { ActionButton, CountDown } from '@/components/Elements';
import { ActionButton, CountDown, SalePriceChart } from '@/components';

import { useSaleInfo } from '@/contexts/sales';
import { SalePhase } from '@/models';
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions src/components/Regions/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export * from './IsmpRegionCard';
export * from './MarketRegion';
export * from './Modals';
export * from './RegionMetaCard';
export * from './RegionOverview';
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions src/components/Sales/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from './SaleDetails';
export * from './SalePrice';
3 changes: 2 additions & 1 deletion src/components/Tables/SalesHistoryTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ import { useState } from 'react';

import { getTimeStringLong } from '@/utils/functions';

import { SaleDetailsModal } from '@/components';

import { SalesHistoryItem } from '@/models';

import { StyledTableCell, StyledTableRow } from '../common';
import { SaleDetailsModal } from '../../Modals';

interface SalesHistoryTableProps {
data: SalesHistoryItem[];
Expand Down
6 changes: 2 additions & 4 deletions src/components/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
export * from './Charts';
export * from './Accounts';
export * from './Elements';
export * from './Header';
export * from './Layout';
export * from './Market';
export * from './Modals';
export * from './Orders';
export * from './Panels';
export * from './Paras';
export * from './Regions';
export * from './Sidebar';
export * from './Sales';
export * from './Tables';

0 comments on commit 1660930

Please sign in to comment.