From 2ddf996aaa130f5ab3e71fb0a25fdb09d29a64e5 Mon Sep 17 00:00:00 2001 From: RyukTheCoder Date: Sun, 22 Dec 2024 06:18:41 +0000 Subject: [PATCH] fix: use src directory --- .../_components/ChartBox/Chart.helper.ts | 0 .../(home)/_components/ChartBox/Chart.tsx | 4 +- .../(home)/_components/ChartBox/Chart.type.ts | 2 +- .../_components/ChartBox/CustomTick.tsx | 0 .../(home)/_components/ChartBox/index.tsx | 0 .../(home)/_components/RecentSwaps/index.tsx | 4 +- .../_components/Summary/Summary.type.ts | 2 +- .../_components/Summary/SummaryItem.tsx | 2 +- .../app}/(home)/_components/Summary/index.tsx | 0 .../app}/(home)/_components/Timer/index.tsx | 4 +- {app => src/app}/(home)/page.tsx | 4 +- {app => src/app}/actions.ts | 2 +- {app => src/app}/error.tsx | 9 +- {app => src/app}/globals.css | 0 {app => src/app}/layout.tsx | 4 +- {app => src/app}/not-found.tsx | 0 .../_components/Pagination/Pagination.type.ts | 0 .../search/_components/Pagination/index.tsx | 4 +- .../search/_components/Result/Result.type.ts | 2 +- .../app}/search/_components/Result/index.tsx | 2 +- {app => src/app}/search/not-found.tsx | 0 {app => src/app}/search/page.tsx | 4 +- .../_components/ChartBarBox/BarChart.tsx | 7 +- .../ChartBarBox/BlockchainFilter.tsx | 4 +- .../ChartBarBox/ChartBarBox.helper.ts | 2 +- .../ChartBarBox/ChartBarBox.type.ts | 4 +- .../_components/ChartBarBox/ModalFilter.tsx | 10 +- .../_components/ChartBarBox/index.tsx | 20 +- .../SankeyChartBox/SankeyChart.tsx | 2 +- .../SankeyChartBox/SankeyChartBox.helper.ts | 4 +- .../SankeyChartBox/SankeyChartBox.type.ts | 4 +- .../_components/SankeyChartBox/index.tsx | 0 .../StatisticsPageContent/index.tsx | 10 +- .../_components/TopList/TopList.helper.ts | 0 .../_components/TopList/TopList.type.ts | 4 +- .../statistics/_components/TopList/index.tsx | 4 +- {app => src/app}/statistics/page.tsx | 8 +- .../SwapDetailSummary/SwapDetail.helper.ts | 0 .../SwapDetailSummary/SwapDetail.type.ts | 2 +- .../SwapDetailSummary/SwapDetailAddress.tsx | 6 +- .../SwapDetailSummary/SwapDetailChain.tsx | 2 +- .../SwapDetailMobileToken.tsx | 6 +- .../SwapDetailMobileValue.tsx | 8 +- .../SwapDetailSummary/SwapDetailValue.tsx | 8 +- .../_components/SwapDetailSummary/index.tsx | 2 +- .../_components/SwapSteps/SwapStepAddress.tsx | 2 +- .../SwapSteps/SwapStepChainAmount.tsx | 0 .../SwapSteps/SwapStepChainLogo.tsx | 2 +- .../_components/SwapSteps/SwapStepItem.tsx | 2 +- .../SwapSteps/SwapStepItemExpanded.tsx | 0 .../_components/SwapSteps/SwapStepSwapper.tsx | 4 +- .../_components/SwapSteps/SwapStepValue.tsx | 2 +- .../_components/SwapSteps/SwapSteps.helper.ts | 0 .../_components/SwapSteps/SwapSteps.type.ts | 2 +- .../_components/SwapSteps/TransactionURL.tsx | 12 +- .../SwapSteps/TransactionURLMobileItem.tsx | 6 +- .../swap/[id]/_components/SwapSteps/index.tsx | 2 +- {app => src/app}/swap/[id]/page.tsx | 4 +- .../components}/common/Button/Button.types.ts | 0 .../components}/common/Button/LinkButton.tsx | 0 .../components}/common/Button/index.tsx | 0 .../ButtonCopyIcon/ButtonCopyIcon.type.ts | 0 .../common/ButtonCopyIcon/index.tsx | 4 +- .../common/Footer/Footer.constants.ts | 2 +- .../components}/common/Footer/Footer.type.ts | 0 .../components}/common/Footer/ListItem.tsx | 0 .../components}/common/Footer/index.tsx | 0 .../common/Header/DesktopHeader.tsx | 0 .../common/Header/Header.helper.ts | 2 +- .../components}/common/Header/Header.ts | 0 .../components}/common/Header/Menu.tsx | 0 .../common/Header/MobileHeader.tsx | 2 +- .../components}/common/Header/MobileMenu.tsx | 0 .../components}/common/Header/index.tsx | 0 .../common/IconStatus/IconStatus.helper.ts | 2 +- .../common/IconStatus/IconStatus.type.ts | 2 +- .../components}/common/IconStatus/index.tsx | 0 .../components}/common/Modal/Modal.types.ts | 0 .../components}/common/Modal/index.tsx | 2 +- .../RefreshButton/RefreshButton.type.ts | 0 .../RefreshButton/RefreshProgressButton.tsx | 0 .../common/RefreshButton/index.tsx | 0 .../components}/common/ReloadButton/index.tsx | 0 .../common/SearchBox/SearchInput.tsx | 2 +- .../common/SearchBox/SearchInput.type.ts | 0 .../components}/common/SearchBox/index.tsx | 0 .../components}/common/Select/Select.types.ts | 0 .../components}/common/Select/index.tsx | 2 +- .../SelectBlockchainProps.types.ts | 2 +- .../common/SelectBlockchain/index.tsx | 4 +- .../components}/common/SvgIcon/SvgIcon.tsx | 0 .../common/SvgIcon/SvgIcon.types.ts | 0 .../components}/common/SvgIcon/index.ts | 0 .../components}/common/Table/Table.helper.ts | 0 .../components}/common/Table/Table.type.ts | 2 +- .../components}/common/Table/TableBody.tsx | 0 .../components}/common/Table/TableHead.tsx | 0 .../common/Table/cells/AmountCell.tsx | 4 +- .../common/Table/cells/RequestIDCell.tsx | 4 +- .../common/Table/cells/StatusCell.tsx | 6 +- .../common/Table/cells/TokenCell.tsx | 2 +- .../components}/common/Table/index.tsx | 0 .../common/Tooltip/Tooltip.type.ts | 0 .../components}/common/Tooltip/index.tsx | 0 .../components}/common/media.tsx | 0 .../components}/icons/ActiveFilter.tsx | 0 .../components}/icons/Affiliate.tsx | 0 .../components}/icons/ApiManagement.tsx | 0 .../components}/icons/Check.tsx | 0 .../components}/icons/ChevronDown.tsx | 0 .../components}/icons/ChevronRight.tsx | 0 .../components}/icons/ChevronUp.tsx | 0 .../components}/icons/Close.tsx | 0 {components => src/components}/icons/Copy.tsx | 0 .../components}/icons/Discord.tsx | 0 {components => src/components}/icons/Docs.tsx | 0 {components => src/components}/icons/Fail.tsx | 0 .../components}/icons/Filter.tsx | 0 .../components}/icons/FirstPage.tsx | 0 {components => src/components}/icons/Gass.tsx | 0 .../components}/icons/Github.tsx | 0 {components => src/components}/icons/Info.tsx | 0 .../components}/icons/LastPage.tsx | 0 {components => src/components}/icons/Link.tsx | 0 .../components}/icons/Loading.tsx | 0 .../components}/icons/Medium.tsx | 0 {components => src/components}/icons/More.tsx | 0 {components => src/components}/icons/Next.tsx | 0 .../components}/icons/NextPage.tsx | 0 .../components}/icons/Paste.tsx | 0 .../components}/icons/PrevPage.tsx | 0 .../components}/icons/Refresh.tsx | 0 .../components}/icons/Running.tsx | 0 .../components}/icons/Search.tsx | 0 .../components}/icons/Steps.tsx | 0 .../components}/icons/Success.tsx | 0 .../components}/icons/Telegram.tsx | 0 .../components}/icons/Twitter.tsx | 0 .../components}/icons/Widget.tsx | 0 .../components}/icons/Youtube.tsx | 0 {components => src/components}/icons/index.ts | 0 {constant => src/constant}/index.ts | 2 +- {services => src/services}/constants.ts | 0 {services => src/services}/index.ts | 2 +- {types => src/types}/index.ts | 0 {types => src/types}/meta.ts | 0 {types => src/types}/summary.ts | 0 {types => src/types}/transations.ts | 0 {utils => src/utils}/amountConverter.ts | 0 {utils => src/utils}/capitalizeFirstLetter.ts | 0 {utils => src/utils}/common.ts | 0 {utils => src/utils}/secondsTohms.ts | 0 styles/globals.css | 249 ------------------ tailwind.config.js | 5 +- tsconfig.json | 1 - 155 files changed, 134 insertions(+), 373 deletions(-) rename {app => src/app}/(home)/_components/ChartBox/Chart.helper.ts (100%) rename {app => src/app}/(home)/_components/ChartBox/Chart.tsx (98%) rename {app => src/app}/(home)/_components/ChartBox/Chart.type.ts (91%) rename {app => src/app}/(home)/_components/ChartBox/CustomTick.tsx (100%) rename {app => src/app}/(home)/_components/ChartBox/index.tsx (100%) rename {app => src/app}/(home)/_components/RecentSwaps/index.tsx (91%) rename {app => src/app}/(home)/_components/Summary/Summary.type.ts (78%) rename {app => src/app}/(home)/_components/Summary/SummaryItem.tsx (89%) rename {app => src/app}/(home)/_components/Summary/index.tsx (100%) rename {app => src/app}/(home)/_components/Timer/index.tsx (90%) rename {app => src/app}/(home)/page.tsx (90%) rename {app => src/app}/actions.ts (74%) rename {app => src/app}/error.tsx (88%) rename {app => src/app}/globals.css (100%) rename {app => src/app}/layout.tsx (93%) rename {app => src/app}/not-found.tsx (100%) rename {app => src/app}/search/_components/Pagination/Pagination.type.ts (100%) rename {app => src/app}/search/_components/Pagination/index.tsx (97%) rename {app => src/app}/search/_components/Result/Result.type.ts (72%) rename {app => src/app}/search/_components/Result/index.tsx (95%) rename {app => src/app}/search/not-found.tsx (100%) rename {app => src/app}/search/page.tsx (91%) rename {app => src/app}/statistics/_components/ChartBarBox/BarChart.tsx (98%) rename {app => src/app}/statistics/_components/ChartBarBox/BlockchainFilter.tsx (95%) rename {app => src/app}/statistics/_components/ChartBarBox/ChartBarBox.helper.ts (99%) rename {app => src/app}/statistics/_components/ChartBarBox/ChartBarBox.type.ts (93%) rename {app => src/app}/statistics/_components/ChartBarBox/ModalFilter.tsx (97%) rename {app => src/app}/statistics/_components/ChartBarBox/index.tsx (95%) rename {app => src/app}/statistics/_components/SankeyChartBox/SankeyChart.tsx (97%) rename {app => src/app}/statistics/_components/SankeyChartBox/SankeyChartBox.helper.ts (97%) rename {app => src/app}/statistics/_components/SankeyChartBox/SankeyChartBox.type.ts (84%) rename {app => src/app}/statistics/_components/SankeyChartBox/index.tsx (100%) rename {app => src/app}/statistics/_components/StatisticsPageContent/index.tsx (95%) rename {app => src/app}/statistics/_components/TopList/TopList.helper.ts (100%) rename {app => src/app}/statistics/_components/TopList/TopList.type.ts (72%) rename {app => src/app}/statistics/_components/TopList/index.tsx (97%) rename {app => src/app}/statistics/page.tsx (88%) rename {app => src/app}/swap/[id]/_components/SwapDetailSummary/SwapDetail.helper.ts (100%) rename {app => src/app}/swap/[id]/_components/SwapDetailSummary/SwapDetail.type.ts (86%) rename {app => src/app}/swap/[id]/_components/SwapDetailSummary/SwapDetailAddress.tsx (89%) rename {app => src/app}/swap/[id]/_components/SwapDetailSummary/SwapDetailChain.tsx (96%) rename {app => src/app}/swap/[id]/_components/SwapDetailSummary/SwapDetailMobileToken.tsx (95%) rename {app => src/app}/swap/[id]/_components/SwapDetailSummary/SwapDetailMobileValue.tsx (92%) rename {app => src/app}/swap/[id]/_components/SwapDetailSummary/SwapDetailValue.tsx (92%) rename {app => src/app}/swap/[id]/_components/SwapDetailSummary/index.tsx (97%) rename {app => src/app}/swap/[id]/_components/SwapSteps/SwapStepAddress.tsx (93%) rename {app => src/app}/swap/[id]/_components/SwapSteps/SwapStepChainAmount.tsx (100%) rename {app => src/app}/swap/[id]/_components/SwapSteps/SwapStepChainLogo.tsx (94%) rename {app => src/app}/swap/[id]/_components/SwapSteps/SwapStepItem.tsx (97%) rename {app => src/app}/swap/[id]/_components/SwapSteps/SwapStepItemExpanded.tsx (100%) rename {app => src/app}/swap/[id]/_components/SwapSteps/SwapStepSwapper.tsx (95%) rename {app => src/app}/swap/[id]/_components/SwapSteps/SwapStepValue.tsx (97%) rename {app => src/app}/swap/[id]/_components/SwapSteps/SwapSteps.helper.ts (100%) rename {app => src/app}/swap/[id]/_components/SwapSteps/SwapSteps.type.ts (98%) rename {app => src/app}/swap/[id]/_components/SwapSteps/TransactionURL.tsx (85%) rename {app => src/app}/swap/[id]/_components/SwapSteps/TransactionURLMobileItem.tsx (94%) rename {app => src/app}/swap/[id]/_components/SwapSteps/index.tsx (95%) rename {app => src/app}/swap/[id]/page.tsx (92%) rename {components => src/components}/common/Button/Button.types.ts (100%) rename {components => src/components}/common/Button/LinkButton.tsx (100%) rename {components => src/components}/common/Button/index.tsx (100%) rename {components => src/components}/common/ButtonCopyIcon/ButtonCopyIcon.type.ts (100%) rename {components => src/components}/common/ButtonCopyIcon/index.tsx (92%) rename {components => src/components}/common/Footer/Footer.constants.ts (98%) rename {components => src/components}/common/Footer/Footer.type.ts (100%) rename {components => src/components}/common/Footer/ListItem.tsx (100%) rename {components => src/components}/common/Footer/index.tsx (100%) rename {components => src/components}/common/Header/DesktopHeader.tsx (100%) rename {components => src/components}/common/Header/Header.helper.ts (97%) rename {components => src/components}/common/Header/Header.ts (100%) rename {components => src/components}/common/Header/Menu.tsx (100%) rename {components => src/components}/common/Header/MobileHeader.tsx (98%) rename {components => src/components}/common/Header/MobileMenu.tsx (100%) rename {components => src/components}/common/Header/index.tsx (100%) rename {components => src/components}/common/IconStatus/IconStatus.helper.ts (89%) rename {components => src/components}/common/IconStatus/IconStatus.type.ts (88%) rename {components => src/components}/common/IconStatus/index.tsx (100%) rename {components => src/components}/common/Modal/Modal.types.ts (100%) rename {components => src/components}/common/Modal/index.tsx (97%) rename {components => src/components}/common/RefreshButton/RefreshButton.type.ts (100%) rename {components => src/components}/common/RefreshButton/RefreshProgressButton.tsx (100%) rename {components => src/components}/common/RefreshButton/index.tsx (100%) rename {components => src/components}/common/ReloadButton/index.tsx (100%) rename {components => src/components}/common/SearchBox/SearchInput.tsx (97%) rename {components => src/components}/common/SearchBox/SearchInput.type.ts (100%) rename {components => src/components}/common/SearchBox/index.tsx (100%) rename {components => src/components}/common/Select/Select.types.ts (100%) rename {components => src/components}/common/Select/index.tsx (97%) rename {components => src/components}/common/SelectBlockchain/SelectBlockchainProps.types.ts (77%) rename {components => src/components}/common/SelectBlockchain/index.tsx (98%) rename {components => src/components}/common/SvgIcon/SvgIcon.tsx (100%) rename {components => src/components}/common/SvgIcon/SvgIcon.types.ts (100%) rename {components => src/components}/common/SvgIcon/index.ts (100%) rename {components => src/components}/common/Table/Table.helper.ts (100%) rename {components => src/components}/common/Table/Table.type.ts (90%) rename {components => src/components}/common/Table/TableBody.tsx (100%) rename {components => src/components}/common/Table/TableHead.tsx (100%) rename {components => src/components}/common/Table/cells/AmountCell.tsx (95%) rename {components => src/components}/common/Table/cells/RequestIDCell.tsx (91%) rename {components => src/components}/common/Table/cells/StatusCell.tsx (90%) rename {components => src/components}/common/Table/cells/TokenCell.tsx (97%) rename {components => src/components}/common/Table/index.tsx (100%) rename {components => src/components}/common/Tooltip/Tooltip.type.ts (100%) rename {components => src/components}/common/Tooltip/index.tsx (100%) rename {components => src/components}/common/media.tsx (100%) rename {components => src/components}/icons/ActiveFilter.tsx (100%) rename {components => src/components}/icons/Affiliate.tsx (100%) rename {components => src/components}/icons/ApiManagement.tsx (100%) rename {components => src/components}/icons/Check.tsx (100%) rename {components => src/components}/icons/ChevronDown.tsx (100%) rename {components => src/components}/icons/ChevronRight.tsx (100%) rename {components => src/components}/icons/ChevronUp.tsx (100%) rename {components => src/components}/icons/Close.tsx (100%) rename {components => src/components}/icons/Copy.tsx (100%) rename {components => src/components}/icons/Discord.tsx (100%) rename {components => src/components}/icons/Docs.tsx (100%) rename {components => src/components}/icons/Fail.tsx (100%) rename {components => src/components}/icons/Filter.tsx (100%) rename {components => src/components}/icons/FirstPage.tsx (100%) rename {components => src/components}/icons/Gass.tsx (100%) rename {components => src/components}/icons/Github.tsx (100%) rename {components => src/components}/icons/Info.tsx (100%) rename {components => src/components}/icons/LastPage.tsx (100%) rename {components => src/components}/icons/Link.tsx (100%) rename {components => src/components}/icons/Loading.tsx (100%) rename {components => src/components}/icons/Medium.tsx (100%) rename {components => src/components}/icons/More.tsx (100%) rename {components => src/components}/icons/Next.tsx (100%) rename {components => src/components}/icons/NextPage.tsx (100%) rename {components => src/components}/icons/Paste.tsx (100%) rename {components => src/components}/icons/PrevPage.tsx (100%) rename {components => src/components}/icons/Refresh.tsx (100%) rename {components => src/components}/icons/Running.tsx (100%) rename {components => src/components}/icons/Search.tsx (100%) rename {components => src/components}/icons/Steps.tsx (100%) rename {components => src/components}/icons/Success.tsx (100%) rename {components => src/components}/icons/Telegram.tsx (100%) rename {components => src/components}/icons/Twitter.tsx (100%) rename {components => src/components}/icons/Widget.tsx (100%) rename {components => src/components}/icons/Youtube.tsx (100%) rename {components => src/components}/icons/index.ts (100%) rename {constant => src/constant}/index.ts (90%) rename {services => src/services}/constants.ts (100%) rename {services => src/services}/index.ts (98%) rename {types => src/types}/index.ts (100%) rename {types => src/types}/meta.ts (100%) rename {types => src/types}/summary.ts (100%) rename {types => src/types}/transations.ts (100%) rename {utils => src/utils}/amountConverter.ts (100%) rename {utils => src/utils}/capitalizeFirstLetter.ts (100%) rename {utils => src/utils}/common.ts (100%) rename {utils => src/utils}/secondsTohms.ts (100%) delete mode 100644 styles/globals.css diff --git a/app/(home)/_components/ChartBox/Chart.helper.ts b/src/app/(home)/_components/ChartBox/Chart.helper.ts similarity index 100% rename from app/(home)/_components/ChartBox/Chart.helper.ts rename to src/app/(home)/_components/ChartBox/Chart.helper.ts diff --git a/app/(home)/_components/ChartBox/Chart.tsx b/src/app/(home)/_components/ChartBox/Chart.tsx similarity index 98% rename from app/(home)/_components/ChartBox/Chart.tsx rename to src/app/(home)/_components/ChartBox/Chart.tsx index 853e837..3ca8fa0 100644 --- a/app/(home)/_components/ChartBox/Chart.tsx +++ b/src/app/(home)/_components/ChartBox/Chart.tsx @@ -13,8 +13,8 @@ import { ChartProps } from './Chart.type'; import isMobile from 'is-mobile'; import { LinearGradient } from '@visx/gradient'; -import { AmountConverter } from 'utils/amountConverter'; -import { getDayOfMonth } from 'utils/common'; +import { AmountConverter } from 'src/utils/amountConverter'; +import { getDayOfMonth } from 'src/utils/common'; import dayjs from 'dayjs'; import utc from 'dayjs/plugin/utc'; diff --git a/app/(home)/_components/ChartBox/Chart.type.ts b/src/app/(home)/_components/ChartBox/Chart.type.ts similarity index 91% rename from app/(home)/_components/ChartBox/Chart.type.ts rename to src/app/(home)/_components/ChartBox/Chart.type.ts index 5d69028..6801015 100644 --- a/app/(home)/_components/ChartBox/Chart.type.ts +++ b/src/app/(home)/_components/ChartBox/Chart.type.ts @@ -1,4 +1,4 @@ -import { DailyIntervalType } from 'types'; +import { DailyIntervalType } from 'src/types'; import { TickRendererProps } from '@visx/axis'; diff --git a/app/(home)/_components/ChartBox/CustomTick.tsx b/src/app/(home)/_components/ChartBox/CustomTick.tsx similarity index 100% rename from app/(home)/_components/ChartBox/CustomTick.tsx rename to src/app/(home)/_components/ChartBox/CustomTick.tsx diff --git a/app/(home)/_components/ChartBox/index.tsx b/src/app/(home)/_components/ChartBox/index.tsx similarity index 100% rename from app/(home)/_components/ChartBox/index.tsx rename to src/app/(home)/_components/ChartBox/index.tsx diff --git a/app/(home)/_components/RecentSwaps/index.tsx b/src/app/(home)/_components/RecentSwaps/index.tsx similarity index 91% rename from app/(home)/_components/RecentSwaps/index.tsx rename to src/app/(home)/_components/RecentSwaps/index.tsx index 04dde4e..7a784d9 100644 --- a/app/(home)/_components/RecentSwaps/index.tsx +++ b/src/app/(home)/_components/RecentSwaps/index.tsx @@ -1,5 +1,5 @@ -import Table from 'components/common/Table'; -import { getLastSwaps } from 'services'; +import Table from 'src/components/common/Table'; +import { getLastSwaps } from 'src/services'; import { Timer } from '../Timer'; const RecentSwaps = async () => { diff --git a/app/(home)/_components/Summary/Summary.type.ts b/src/app/(home)/_components/Summary/Summary.type.ts similarity index 78% rename from app/(home)/_components/Summary/Summary.type.ts rename to src/app/(home)/_components/Summary/Summary.type.ts index 989b71e..7f4d815 100644 --- a/app/(home)/_components/Summary/Summary.type.ts +++ b/src/app/(home)/_components/Summary/Summary.type.ts @@ -1,4 +1,4 @@ -import { SummaryType } from 'types'; +import { SummaryType } from 'src/types'; export interface SummaryProps { summary: SummaryType; diff --git a/app/(home)/_components/Summary/SummaryItem.tsx b/src/app/(home)/_components/Summary/SummaryItem.tsx similarity index 89% rename from app/(home)/_components/Summary/SummaryItem.tsx rename to src/app/(home)/_components/Summary/SummaryItem.tsx index 386e648..c2218e9 100644 --- a/app/(home)/_components/Summary/SummaryItem.tsx +++ b/src/app/(home)/_components/Summary/SummaryItem.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { SummaryItemProps } from './Summary.type'; -import { AmountConverter } from 'utils/amountConverter'; +import { AmountConverter } from 'src/utils/amountConverter'; function SummaryItem(props: SummaryItemProps) { const { value, title, prefix } = props; diff --git a/app/(home)/_components/Summary/index.tsx b/src/app/(home)/_components/Summary/index.tsx similarity index 100% rename from app/(home)/_components/Summary/index.tsx rename to src/app/(home)/_components/Summary/index.tsx diff --git a/app/(home)/_components/Timer/index.tsx b/src/app/(home)/_components/Timer/index.tsx similarity index 90% rename from app/(home)/_components/Timer/index.tsx rename to src/app/(home)/_components/Timer/index.tsx index 1bd81b0..24de0c7 100644 --- a/app/(home)/_components/Timer/index.tsx +++ b/src/app/(home)/_components/Timer/index.tsx @@ -1,7 +1,7 @@ 'use client'; -import refreshLatestSwaps from 'app/actions'; -import RefreshButton from 'components/common/RefreshButton'; +import refreshLatestSwaps from 'src/app/actions'; +import RefreshButton from 'src/components/common/RefreshButton'; import { useEffect, useState } from 'react'; const REFRESH_TIME = 30; diff --git a/app/(home)/page.tsx b/src/app/(home)/page.tsx similarity index 90% rename from app/(home)/page.tsx rename to src/app/(home)/page.tsx index 7127ce5..8e38fb9 100644 --- a/app/(home)/page.tsx +++ b/src/app/(home)/page.tsx @@ -1,6 +1,6 @@ -import SearchBox from 'components/common/SearchBox'; +import SearchBox from 'src/components/common/SearchBox'; import { Metadata } from 'next'; -import { getSummary } from 'services'; +import { getSummary } from 'src/services'; import Summary from './_components/Summary'; import ChartBox from './_components/ChartBox'; import RecentSwaps from './_components/RecentSwaps'; diff --git a/app/actions.ts b/src/app/actions.ts similarity index 74% rename from app/actions.ts rename to src/app/actions.ts index 77f713a..cb3bd8b 100644 --- a/app/actions.ts +++ b/src/app/actions.ts @@ -1,7 +1,7 @@ 'use server'; import { revalidateTag } from 'next/cache'; -import { GET_LAST_SWAPS_TAG } from 'services'; +import { GET_LAST_SWAPS_TAG } from 'src/services'; export default async function refreshLatestSwaps() { revalidateTag(GET_LAST_SWAPS_TAG); diff --git a/app/error.tsx b/src/app/error.tsx similarity index 88% rename from app/error.tsx rename to src/app/error.tsx index 2f45bfd..8b5f454 100644 --- a/app/error.tsx +++ b/src/app/error.tsx @@ -4,9 +4,12 @@ import dynamic from 'next/dynamic'; import Image from 'next/image'; import errorImage from 'public/img/error.png'; -const ReloadButton = dynamic(() => import('components/common/ReloadButton'), { - ssr: false, -}); +const ReloadButton = dynamic( + () => import('src/components/common/ReloadButton'), + { + ssr: false, + }, +); const Error = () => { return ( diff --git a/app/globals.css b/src/app/globals.css similarity index 100% rename from app/globals.css rename to src/app/globals.css diff --git a/app/layout.tsx b/src/app/layout.tsx similarity index 93% rename from app/layout.tsx rename to src/app/layout.tsx index d06f332..0a79315 100644 --- a/app/layout.tsx +++ b/src/app/layout.tsx @@ -1,6 +1,6 @@ -import { Footer } from 'components/common/Footer'; +import { Footer } from 'src/components/common/Footer'; import './globals.css'; -import Header from 'components/common/Header'; +import Header from 'src/components/common/Header'; import { Metadata } from 'next'; const description = 'Track all transactions on Rango Exchange'; diff --git a/app/not-found.tsx b/src/app/not-found.tsx similarity index 100% rename from app/not-found.tsx rename to src/app/not-found.tsx diff --git a/app/search/_components/Pagination/Pagination.type.ts b/src/app/search/_components/Pagination/Pagination.type.ts similarity index 100% rename from app/search/_components/Pagination/Pagination.type.ts rename to src/app/search/_components/Pagination/Pagination.type.ts diff --git a/app/search/_components/Pagination/index.tsx b/src/app/search/_components/Pagination/index.tsx similarity index 97% rename from app/search/_components/Pagination/index.tsx rename to src/app/search/_components/Pagination/index.tsx index bd24a2c..f127522 100644 --- a/app/search/_components/Pagination/index.tsx +++ b/src/app/search/_components/Pagination/index.tsx @@ -1,11 +1,11 @@ -import { SEARCH_RESULT_OFFSET as offsetPage } from 'constant'; +import { SEARCH_RESULT_OFFSET as offsetPage } from 'src/constant'; import { PropsType } from './Pagination.type'; import { FirstPageIcon, LastPageIcon, NextPageIcon, PrevPageIcon, -} from 'components/icons'; +} from 'src/components/icons'; import Link from 'next/link'; function Pagination(props: PropsType) { diff --git a/app/search/_components/Result/Result.type.ts b/src/app/search/_components/Result/Result.type.ts similarity index 72% rename from app/search/_components/Result/Result.type.ts rename to src/app/search/_components/Result/Result.type.ts index 561529b..5434582 100644 --- a/app/search/_components/Result/Result.type.ts +++ b/src/app/search/_components/Result/Result.type.ts @@ -1,4 +1,4 @@ -import { SwapType } from 'types'; +import { SwapType } from 'src/types'; export interface PropsType { data: SwapType[]; diff --git a/app/search/_components/Result/index.tsx b/src/app/search/_components/Result/index.tsx similarity index 95% rename from app/search/_components/Result/index.tsx rename to src/app/search/_components/Result/index.tsx index b5ca139..bd0bc8d 100644 --- a/app/search/_components/Result/index.tsx +++ b/src/app/search/_components/Result/index.tsx @@ -1,6 +1,6 @@ import { PropsType } from './Result.type'; import Pagination from '../Pagination'; -import Table from 'components/common/Table'; +import Table from 'src/components/common/Table'; function Result(props: PropsType) { const { data, query, total, page } = props; diff --git a/app/search/not-found.tsx b/src/app/search/not-found.tsx similarity index 100% rename from app/search/not-found.tsx rename to src/app/search/not-found.tsx diff --git a/app/search/page.tsx b/src/app/search/page.tsx similarity index 91% rename from app/search/page.tsx rename to src/app/search/page.tsx index 3d0919e..663d954 100644 --- a/app/search/page.tsx +++ b/src/app/search/page.tsx @@ -1,6 +1,6 @@ -import { MATCH_TYPE } from 'constant'; +import { MATCH_TYPE } from 'src/constant'; import { notFound, redirect } from 'next/navigation'; -import { getSearchResult, getWalletSwaps } from 'services'; +import { getSearchResult, getWalletSwaps } from 'src/services'; import Result from './_components/Result'; export async function generateMetadata({ diff --git a/app/statistics/_components/ChartBarBox/BarChart.tsx b/src/app/statistics/_components/ChartBarBox/BarChart.tsx similarity index 98% rename from app/statistics/_components/ChartBarBox/BarChart.tsx rename to src/app/statistics/_components/ChartBarBox/BarChart.tsx index 31deefe..dc46614 100644 --- a/app/statistics/_components/ChartBarBox/BarChart.tsx +++ b/src/app/statistics/_components/ChartBarBox/BarChart.tsx @@ -4,7 +4,7 @@ import { BarStackDataType, TooltipDataType, } from './ChartBarBox.type'; -import { getDayOfMonth } from 'utils/common'; +import { getDayOfMonth } from 'src/utils/common'; import { DEFAULT_MARGIN, DesktopBottomAxisData, @@ -12,7 +12,10 @@ import { getTotalValueDates, mobileBottomAxisData, } from './ChartBarBox.helper'; -import { AmountConverter, compactNumberFormat } from 'utils/amountConverter'; +import { + AmountConverter, + compactNumberFormat, +} from 'src/utils/amountConverter'; import dayjs from 'dayjs'; import utc from 'dayjs/plugin/utc'; import React, { Fragment, useEffect, useRef } from 'react'; diff --git a/app/statistics/_components/ChartBarBox/BlockchainFilter.tsx b/src/app/statistics/_components/ChartBarBox/BlockchainFilter.tsx similarity index 95% rename from app/statistics/_components/ChartBarBox/BlockchainFilter.tsx rename to src/app/statistics/_components/ChartBarBox/BlockchainFilter.tsx index 27ba991..ebe596f 100644 --- a/app/statistics/_components/ChartBarBox/BlockchainFilter.tsx +++ b/src/app/statistics/_components/ChartBarBox/BlockchainFilter.tsx @@ -1,8 +1,8 @@ import React, { Fragment, useState } from 'react'; import { BlockchainFilterProps } from './ChartBarBox.type'; import Image from 'next/image'; -import { CheckIcon, SearchIcon } from 'components/icons'; -import { containsText } from 'utils/common'; +import { CheckIcon, SearchIcon } from 'src/components/icons'; +import { containsText } from 'src/utils/common'; function BlockchainFilter(props: BlockchainFilterProps) { const { blockchains, selectedBlockchain, onSelect } = props; diff --git a/app/statistics/_components/ChartBarBox/ChartBarBox.helper.ts b/src/app/statistics/_components/ChartBarBox/ChartBarBox.helper.ts similarity index 99% rename from app/statistics/_components/ChartBarBox/ChartBarBox.helper.ts rename to src/app/statistics/_components/ChartBarBox/ChartBarBox.helper.ts index 5f9c930..259f872 100644 --- a/app/statistics/_components/ChartBarBox/ChartBarBox.helper.ts +++ b/src/app/statistics/_components/ChartBarBox/ChartBarBox.helper.ts @@ -4,7 +4,7 @@ import { ChartType, ColorBlockchainMapType, } from './ChartBarBox.type'; -import { DailySummaryType } from 'types'; +import { DailySummaryType } from 'src/types'; export const BAR_CHART_BLOCKCHAIN_NUMBER = 10; diff --git a/app/statistics/_components/ChartBarBox/ChartBarBox.type.ts b/src/app/statistics/_components/ChartBarBox/ChartBarBox.type.ts similarity index 93% rename from app/statistics/_components/ChartBarBox/ChartBarBox.type.ts rename to src/app/statistics/_components/ChartBarBox/ChartBarBox.type.ts index 119a0cb..15240c6 100644 --- a/app/statistics/_components/ChartBarBox/ChartBarBox.type.ts +++ b/src/app/statistics/_components/ChartBarBox/ChartBarBox.type.ts @@ -1,5 +1,5 @@ -import { DailySummaryType, StatisticDaysFilter } from 'types'; -import { BlockchainMeta } from 'types/meta'; +import { DailySummaryType, StatisticDaysFilter } from 'src/types'; +import { BlockchainMeta } from 'src/types/meta'; import { SeriesPoint } from '@visx/shape/lib/types'; export type ChartType = 'transaction' | 'volume'; diff --git a/app/statistics/_components/ChartBarBox/ModalFilter.tsx b/src/app/statistics/_components/ChartBarBox/ModalFilter.tsx similarity index 97% rename from app/statistics/_components/ChartBarBox/ModalFilter.tsx rename to src/app/statistics/_components/ChartBarBox/ModalFilter.tsx index fcfc0a5..91d24f5 100644 --- a/app/statistics/_components/ChartBarBox/ModalFilter.tsx +++ b/src/app/statistics/_components/ChartBarBox/ModalFilter.tsx @@ -4,13 +4,13 @@ import { ModalFilterType, BlockchainFilterType, } from './ChartBarBox.type'; -import { Modal } from 'components/common/Modal'; +import { Modal } from 'src/components/common/Modal'; import Image from 'next/image'; -import { ChevronRightIcon, CloseIcon } from 'components/icons'; -import { BreakDownList } from 'types'; -import { Button } from 'components/common/Button'; +import { ChevronRightIcon, CloseIcon } from 'src/components/icons'; +import { BreakDownList } from 'src/types'; +import { Button } from 'src/components/common/Button'; import BlockchainFilter from './BlockchainFilter'; -import { DEFAULT_STATISTIC_BREAK_DOWN_FILTER } from 'constant'; +import { DEFAULT_STATISTIC_BREAK_DOWN_FILTER } from 'src/constant'; function ModalFilter(props: ModalFilterType) { const { blockchains, selectedFilter, open, onClose, onApply } = props; diff --git a/app/statistics/_components/ChartBarBox/index.tsx b/src/app/statistics/_components/ChartBarBox/index.tsx similarity index 95% rename from app/statistics/_components/ChartBarBox/index.tsx rename to src/app/statistics/_components/ChartBarBox/index.tsx index 3f9fe9f..81f9df3 100644 --- a/app/statistics/_components/ChartBarBox/index.tsx +++ b/src/app/statistics/_components/ChartBarBox/index.tsx @@ -1,24 +1,28 @@ import React, { useEffect, useMemo, useState } from 'react'; import { FilterBarChart, PropsType } from './ChartBarBox.type'; -import { numberWithCommas } from 'utils/amountConverter'; -import { SelectBlockchain } from 'components/common/SelectBlockchain'; +import { numberWithCommas } from 'src/utils/amountConverter'; +import { SelectBlockchain } from 'src/components/common/SelectBlockchain'; import { BreakDownList, DailySummaryOption, DailySummaryType, StatisticDaysFilter, -} from 'types'; -import { getDailySummary } from 'services'; -import { Select } from 'components/common/Select'; -import { OptionType } from 'components/common/Select/Select.types'; +} from 'src/types'; +import { getDailySummary } from 'src/services'; +import { Select } from 'src/components/common/Select'; +import { OptionType } from 'src/components/common/Select/Select.types'; import { getBarChartData } from './ChartBarBox.helper'; -import { ActiveFilterIcon, FilterIcon, LoadingIcon } from 'components/icons'; +import { + ActiveFilterIcon, + FilterIcon, + LoadingIcon, +} from 'src/components/icons'; import ModalFilter from './ModalFilter'; import ParentSize from '@visx/responsive/lib/components/ParentSize'; import { DEFAULT_STATISTIC_BREAK_DOWN_FILTER, DEFAULT_STATISTIC_DAYS, -} from 'constant'; +} from 'src/constant'; import BarChart from './BarChart'; function ChartBarBox(props: PropsType) { diff --git a/app/statistics/_components/SankeyChartBox/SankeyChart.tsx b/src/app/statistics/_components/SankeyChartBox/SankeyChart.tsx similarity index 97% rename from app/statistics/_components/SankeyChartBox/SankeyChart.tsx rename to src/app/statistics/_components/SankeyChartBox/SankeyChart.tsx index 9f78008..bc32db0 100644 --- a/app/statistics/_components/SankeyChartBox/SankeyChart.tsx +++ b/src/app/statistics/_components/SankeyChartBox/SankeyChart.tsx @@ -7,7 +7,7 @@ import { DEFAULT_BLOCKCHAIN_COLOR, SPLIT_SOURCE_DESTINATION, } from './SankeyChartBox.helper'; -import { compactNumberFormat } from 'utils/amountConverter'; +import { compactNumberFormat } from 'src/utils/amountConverter'; Chart.register(SankeyController, Flow, ...registerables); diff --git a/app/statistics/_components/SankeyChartBox/SankeyChartBox.helper.ts b/src/app/statistics/_components/SankeyChartBox/SankeyChartBox.helper.ts similarity index 97% rename from app/statistics/_components/SankeyChartBox/SankeyChartBox.helper.ts rename to src/app/statistics/_components/SankeyChartBox/SankeyChartBox.helper.ts index 35dc180..c9edbfe 100644 --- a/app/statistics/_components/SankeyChartBox/SankeyChartBox.helper.ts +++ b/src/app/statistics/_components/SankeyChartBox/SankeyChartBox.helper.ts @@ -1,10 +1,10 @@ -import { BlockchainPathMap } from 'types'; +import { BlockchainPathMap } from 'src/types'; import { SankeyDataType, SankeyLabelsType, SankeyPriorityType, } from './SankeyChartBox.type'; -import { BlockchainMeta } from 'types/meta'; +import { BlockchainMeta } from 'src/types/meta'; const MAX_NUMBER_OF_SOURCE = 10; const MAX_NUMBER_OF_DESTINATION = 10; diff --git a/app/statistics/_components/SankeyChartBox/SankeyChartBox.type.ts b/src/app/statistics/_components/SankeyChartBox/SankeyChartBox.type.ts similarity index 84% rename from app/statistics/_components/SankeyChartBox/SankeyChartBox.type.ts rename to src/app/statistics/_components/SankeyChartBox/SankeyChartBox.type.ts index 58a6d3e..01ea9ac 100644 --- a/app/statistics/_components/SankeyChartBox/SankeyChartBox.type.ts +++ b/src/app/statistics/_components/SankeyChartBox/SankeyChartBox.type.ts @@ -1,5 +1,5 @@ -import { BlockchainPathMap } from 'types'; -import { BlockchainMeta } from 'types/meta'; +import { BlockchainPathMap } from 'src/types'; +import { BlockchainMeta } from 'src/types/meta'; export type PropsType = { blockchainDataMap: Map; diff --git a/app/statistics/_components/SankeyChartBox/index.tsx b/src/app/statistics/_components/SankeyChartBox/index.tsx similarity index 100% rename from app/statistics/_components/SankeyChartBox/index.tsx rename to src/app/statistics/_components/SankeyChartBox/index.tsx diff --git a/app/statistics/_components/StatisticsPageContent/index.tsx b/src/app/statistics/_components/StatisticsPageContent/index.tsx similarity index 95% rename from app/statistics/_components/StatisticsPageContent/index.tsx rename to src/app/statistics/_components/StatisticsPageContent/index.tsx index 7d41d07..fd7f4b5 100644 --- a/app/statistics/_components/StatisticsPageContent/index.tsx +++ b/src/app/statistics/_components/StatisticsPageContent/index.tsx @@ -1,17 +1,17 @@ 'use client'; -import { getTopListSummary } from 'services'; +import { getTopListSummary } from 'src/services'; -import { BlockchainMeta } from 'types/meta'; +import { BlockchainMeta } from 'src/types/meta'; import { DailySummaryType, StatisticDaysFilter, TopListSummaryType, -} from 'types'; +} from 'src/types'; import Link from 'next/link'; -import { ChevronRightIcon, LoadingIcon } from 'components/icons'; +import { ChevronRightIcon, LoadingIcon } from 'src/components/icons'; import { useEffect, useState } from 'react'; -import { DEFAULT_STATISTIC_DAYS } from 'constant'; +import { DEFAULT_STATISTIC_DAYS } from 'src/constant'; import TopList from '../TopList'; import ChartBarBox from '../ChartBarBox'; diff --git a/app/statistics/_components/TopList/TopList.helper.ts b/src/app/statistics/_components/TopList/TopList.helper.ts similarity index 100% rename from app/statistics/_components/TopList/TopList.helper.ts rename to src/app/statistics/_components/TopList/TopList.helper.ts diff --git a/app/statistics/_components/TopList/TopList.type.ts b/src/app/statistics/_components/TopList/TopList.type.ts similarity index 72% rename from app/statistics/_components/TopList/TopList.type.ts rename to src/app/statistics/_components/TopList/TopList.type.ts index ea681a7..abcbc05 100644 --- a/app/statistics/_components/TopList/TopList.type.ts +++ b/src/app/statistics/_components/TopList/TopList.type.ts @@ -1,5 +1,5 @@ -import { BlockchainMap, BlockchainPathMap } from 'types'; -import { BlockchainMeta } from 'types/meta'; +import { BlockchainMap, BlockchainPathMap } from 'src/types'; +import { BlockchainMeta } from 'src/types/meta'; export type TopListItemProps = { title: string; diff --git a/app/statistics/_components/TopList/index.tsx b/src/app/statistics/_components/TopList/index.tsx similarity index 97% rename from app/statistics/_components/TopList/index.tsx rename to src/app/statistics/_components/TopList/index.tsx index 3de9341..34323ae 100644 --- a/app/statistics/_components/TopList/index.tsx +++ b/src/app/statistics/_components/TopList/index.tsx @@ -1,8 +1,8 @@ /* eslint-disable @next/next/no-img-element */ -import { compactNumberFormat } from 'utils/amountConverter'; +import { compactNumberFormat } from 'src/utils/amountConverter'; import { TopListItemProps } from './TopList.type'; import React from 'react'; -import { NextIcon } from 'components/icons'; +import { NextIcon } from 'src/components/icons'; import { TOP_LIST_NUMBER_TO_SHOW } from './TopList.helper'; function TopList(props: TopListItemProps) { diff --git a/app/statistics/page.tsx b/src/app/statistics/page.tsx similarity index 88% rename from app/statistics/page.tsx rename to src/app/statistics/page.tsx index fa1d066..0f1e382 100644 --- a/app/statistics/page.tsx +++ b/src/app/statistics/page.tsx @@ -1,9 +1,13 @@ -import { getBlockchains, getDailySummary, getTopListSummary } from 'services'; +import { + getBlockchains, + getDailySummary, + getTopListSummary, +} from 'src/services'; import { DEFAULT_STATISTIC_BREAK_DOWN_FILTER, DEFAULT_STATISTIC_DAYS, -} from 'constant'; +} from 'src/constant'; import StatisticsPageContent from './_components/StatisticsPageContent'; import { Metadata } from 'next'; diff --git a/app/swap/[id]/_components/SwapDetailSummary/SwapDetail.helper.ts b/src/app/swap/[id]/_components/SwapDetailSummary/SwapDetail.helper.ts similarity index 100% rename from app/swap/[id]/_components/SwapDetailSummary/SwapDetail.helper.ts rename to src/app/swap/[id]/_components/SwapDetailSummary/SwapDetail.helper.ts diff --git a/app/swap/[id]/_components/SwapDetailSummary/SwapDetail.type.ts b/src/app/swap/[id]/_components/SwapDetailSummary/SwapDetail.type.ts similarity index 86% rename from app/swap/[id]/_components/SwapDetailSummary/SwapDetail.type.ts rename to src/app/swap/[id]/_components/SwapDetailSummary/SwapDetail.type.ts index 0670725..9dd08e7 100644 --- a/app/swap/[id]/_components/SwapDetailSummary/SwapDetail.type.ts +++ b/src/app/swap/[id]/_components/SwapDetailSummary/SwapDetail.type.ts @@ -1,4 +1,4 @@ -import { DetailsType } from 'types'; +import { DetailsType } from 'src/types'; export interface PropsType { details: DetailsType; diff --git a/app/swap/[id]/_components/SwapDetailSummary/SwapDetailAddress.tsx b/src/app/swap/[id]/_components/SwapDetailSummary/SwapDetailAddress.tsx similarity index 89% rename from app/swap/[id]/_components/SwapDetailSummary/SwapDetailAddress.tsx rename to src/app/swap/[id]/_components/SwapDetailSummary/SwapDetailAddress.tsx index 931dea3..f22fbc7 100644 --- a/app/swap/[id]/_components/SwapDetailSummary/SwapDetailAddress.tsx +++ b/src/app/swap/[id]/_components/SwapDetailSummary/SwapDetailAddress.tsx @@ -1,10 +1,10 @@ import Link from 'next/link'; import { SwapDetailItem } from './SwapDetail.type'; -import ButtonCopyIcon from 'components/common/ButtonCopyIcon'; -import { SearchIcon } from 'components/icons'; +import ButtonCopyIcon from 'src/components/common/ButtonCopyIcon'; +import { SearchIcon } from 'src/components/icons'; import Image from 'next/image'; import logo from 'public/logo.png'; -import Tooltip from 'components/common/Tooltip'; +import Tooltip from 'src/components/common/Tooltip'; function SwapDetailAddress(props: SwapDetailItem) { const { details, column } = props; diff --git a/app/swap/[id]/_components/SwapDetailSummary/SwapDetailChain.tsx b/src/app/swap/[id]/_components/SwapDetailSummary/SwapDetailChain.tsx similarity index 96% rename from app/swap/[id]/_components/SwapDetailSummary/SwapDetailChain.tsx rename to src/app/swap/[id]/_components/SwapDetailSummary/SwapDetailChain.tsx index 0e398da..5b7e40a 100644 --- a/app/swap/[id]/_components/SwapDetailSummary/SwapDetailChain.tsx +++ b/src/app/swap/[id]/_components/SwapDetailSummary/SwapDetailChain.tsx @@ -1,5 +1,5 @@ /* eslint-disable @next/next/no-img-element */ -import { DEFAULT_TOKEN_LOGO } from 'constant'; +import { DEFAULT_TOKEN_LOGO } from 'src/constant'; import { SwapDetailItem } from './SwapDetail.type'; function SwapDetailChain(props: SwapDetailItem) { diff --git a/app/swap/[id]/_components/SwapDetailSummary/SwapDetailMobileToken.tsx b/src/app/swap/[id]/_components/SwapDetailSummary/SwapDetailMobileToken.tsx similarity index 95% rename from app/swap/[id]/_components/SwapDetailSummary/SwapDetailMobileToken.tsx rename to src/app/swap/[id]/_components/SwapDetailSummary/SwapDetailMobileToken.tsx index 9496eb7..ed59271 100644 --- a/app/swap/[id]/_components/SwapDetailSummary/SwapDetailMobileToken.tsx +++ b/src/app/swap/[id]/_components/SwapDetailSummary/SwapDetailMobileToken.tsx @@ -1,10 +1,10 @@ /* eslint-disable @next/next/no-img-element */ -import ButtonCopyIcon from 'components/common/ButtonCopyIcon'; +import ButtonCopyIcon from 'src/components/common/ButtonCopyIcon'; import { SwapDetailItem } from './SwapDetail.type'; import Link from 'next/link'; -import { DEFAULT_TOKEN_LOGO } from 'constant'; +import { DEFAULT_TOKEN_LOGO } from 'src/constant'; import Image from 'next/image'; -import { SearchIcon } from 'components/icons'; +import { SearchIcon } from 'src/components/icons'; import rango from 'public/logo.png'; function SwapDetailMobileToken(props: SwapDetailItem) { diff --git a/app/swap/[id]/_components/SwapDetailSummary/SwapDetailMobileValue.tsx b/src/app/swap/[id]/_components/SwapDetailSummary/SwapDetailMobileValue.tsx similarity index 92% rename from app/swap/[id]/_components/SwapDetailSummary/SwapDetailMobileValue.tsx rename to src/app/swap/[id]/_components/SwapDetailSummary/SwapDetailMobileValue.tsx index 9344e48..480b583 100644 --- a/app/swap/[id]/_components/SwapDetailSummary/SwapDetailMobileValue.tsx +++ b/src/app/swap/[id]/_components/SwapDetailSummary/SwapDetailMobileValue.tsx @@ -1,11 +1,11 @@ /* eslint-disable @next/next/no-img-element */ -import { SecondsTohms } from 'utils/secondsTohms'; +import { SecondsTohms } from 'src/utils/secondsTohms'; import { SwapDetailItem } from './SwapDetail.type'; import dayjs from 'dayjs'; import utc from 'dayjs/plugin/utc'; -import IconStatus from 'components/common/IconStatus'; -import { StepsIcon } from 'components/icons'; -import Tooltip from 'components/common/Tooltip'; +import IconStatus from 'src/components/common/IconStatus'; +import { StepsIcon } from 'src/components/icons'; +import Tooltip from 'src/components/common/Tooltip'; dayjs.extend(utc); diff --git a/app/swap/[id]/_components/SwapDetailSummary/SwapDetailValue.tsx b/src/app/swap/[id]/_components/SwapDetailSummary/SwapDetailValue.tsx similarity index 92% rename from app/swap/[id]/_components/SwapDetailSummary/SwapDetailValue.tsx rename to src/app/swap/[id]/_components/SwapDetailSummary/SwapDetailValue.tsx index 0d194ae..479fbf6 100644 --- a/app/swap/[id]/_components/SwapDetailSummary/SwapDetailValue.tsx +++ b/src/app/swap/[id]/_components/SwapDetailSummary/SwapDetailValue.tsx @@ -1,11 +1,11 @@ /* eslint-disable @next/next/no-img-element */ -import { SecondsTohms } from 'utils/secondsTohms'; +import { SecondsTohms } from 'src/utils/secondsTohms'; import { SwapDetailItem } from './SwapDetail.type'; import dayjs from 'dayjs'; import utc from 'dayjs/plugin/utc'; -import IconStatus from 'components/common/IconStatus'; -import { StepsIcon } from 'components/icons'; -import Tooltip from 'components/common/Tooltip'; +import IconStatus from 'src/components/common/IconStatus'; +import { StepsIcon } from 'src/components/icons'; +import Tooltip from 'src/components/common/Tooltip'; dayjs.extend(utc); diff --git a/app/swap/[id]/_components/SwapDetailSummary/index.tsx b/src/app/swap/[id]/_components/SwapDetailSummary/index.tsx similarity index 97% rename from app/swap/[id]/_components/SwapDetailSummary/index.tsx rename to src/app/swap/[id]/_components/SwapDetailSummary/index.tsx index f63a610..f47fafd 100644 --- a/app/swap/[id]/_components/SwapDetailSummary/index.tsx +++ b/src/app/swap/[id]/_components/SwapDetailSummary/index.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { DesktopColumns, mobileColumns } from './SwapDetail.helper'; import { PropsType } from './SwapDetail.type'; -import ButtonCopyIcon from 'components/common/ButtonCopyIcon'; +import ButtonCopyIcon from 'src/components/common/ButtonCopyIcon'; function SwapDetailSummary(props: PropsType) { const { details, id } = props; diff --git a/app/swap/[id]/_components/SwapSteps/SwapStepAddress.tsx b/src/app/swap/[id]/_components/SwapSteps/SwapStepAddress.tsx similarity index 93% rename from app/swap/[id]/_components/SwapSteps/SwapStepAddress.tsx rename to src/app/swap/[id]/_components/SwapSteps/SwapStepAddress.tsx index bdd5947..d41e30f 100644 --- a/app/swap/[id]/_components/SwapSteps/SwapStepAddress.tsx +++ b/src/app/swap/[id]/_components/SwapSteps/SwapStepAddress.tsx @@ -1,6 +1,6 @@ import Link from 'next/link'; import { SwapStepItemValueProps } from './SwapSteps.type'; -import ButtonCopyIcon from 'components/common/ButtonCopyIcon'; +import ButtonCopyIcon from 'src/components/common/ButtonCopyIcon'; function SwapStepAddress(props: SwapStepItemValueProps) { const { step, column } = props; diff --git a/app/swap/[id]/_components/SwapSteps/SwapStepChainAmount.tsx b/src/app/swap/[id]/_components/SwapSteps/SwapStepChainAmount.tsx similarity index 100% rename from app/swap/[id]/_components/SwapSteps/SwapStepChainAmount.tsx rename to src/app/swap/[id]/_components/SwapSteps/SwapStepChainAmount.tsx diff --git a/app/swap/[id]/_components/SwapSteps/SwapStepChainLogo.tsx b/src/app/swap/[id]/_components/SwapSteps/SwapStepChainLogo.tsx similarity index 94% rename from app/swap/[id]/_components/SwapSteps/SwapStepChainLogo.tsx rename to src/app/swap/[id]/_components/SwapSteps/SwapStepChainLogo.tsx index 2942efe..c46d166 100644 --- a/app/swap/[id]/_components/SwapSteps/SwapStepChainLogo.tsx +++ b/src/app/swap/[id]/_components/SwapSteps/SwapStepChainLogo.tsx @@ -1,7 +1,7 @@ /* eslint-disable @next/next/no-img-element */ import React from 'react'; import { SwapStepChainLogoProps } from './SwapSteps.type'; -import { DEFAULT_TOKEN_LOGO } from 'constant'; +import { DEFAULT_TOKEN_LOGO } from 'src/constant'; function SwapStepChainLogo(props: SwapStepChainLogoProps) { const { token } = props; diff --git a/app/swap/[id]/_components/SwapSteps/SwapStepItem.tsx b/src/app/swap/[id]/_components/SwapSteps/SwapStepItem.tsx similarity index 97% rename from app/swap/[id]/_components/SwapSteps/SwapStepItem.tsx rename to src/app/swap/[id]/_components/SwapSteps/SwapStepItem.tsx index 1cbf1e7..e5c1f36 100644 --- a/app/swap/[id]/_components/SwapSteps/SwapStepItem.tsx +++ b/src/app/swap/[id]/_components/SwapSteps/SwapStepItem.tsx @@ -5,7 +5,7 @@ import { SwapStepItemProps } from './SwapSteps.type'; import TransactionURL from './TransactionURL'; import SwapStepItemExpanded from './SwapStepItemExpanded'; import { BorderColor } from './SwapSteps.helper'; -import { ChevronDownIcon, ChevronUpIcon, NextIcon } from 'components/icons'; +import { ChevronDownIcon, ChevronUpIcon, NextIcon } from 'src/components/icons'; import SwapStepChainLogo from './SwapStepChainLogo'; import SwapStepChainAmount from './SwapStepChainAmount'; import SwapStepSwapper from './SwapStepSwapper'; diff --git a/app/swap/[id]/_components/SwapSteps/SwapStepItemExpanded.tsx b/src/app/swap/[id]/_components/SwapSteps/SwapStepItemExpanded.tsx similarity index 100% rename from app/swap/[id]/_components/SwapSteps/SwapStepItemExpanded.tsx rename to src/app/swap/[id]/_components/SwapSteps/SwapStepItemExpanded.tsx diff --git a/app/swap/[id]/_components/SwapSteps/SwapStepSwapper.tsx b/src/app/swap/[id]/_components/SwapSteps/SwapStepSwapper.tsx similarity index 95% rename from app/swap/[id]/_components/SwapSteps/SwapStepSwapper.tsx rename to src/app/swap/[id]/_components/SwapSteps/SwapStepSwapper.tsx index 1289214..80cbd5a 100644 --- a/app/swap/[id]/_components/SwapSteps/SwapStepSwapper.tsx +++ b/src/app/swap/[id]/_components/SwapSteps/SwapStepSwapper.tsx @@ -1,9 +1,9 @@ /* eslint-disable @next/next/no-img-element */ import React from 'react'; import { SwapStepItemProps } from './SwapSteps.type'; -import { InternalPathType } from 'types'; +import { InternalPathType } from 'src/types'; import { BorderColor } from './SwapSteps.helper'; -import { DEFAULT_TOKEN_LOGO } from 'constant'; +import { DEFAULT_TOKEN_LOGO } from 'src/constant'; function SwapStepSwapper(props: SwapStepItemProps) { const { step } = props; diff --git a/app/swap/[id]/_components/SwapSteps/SwapStepValue.tsx b/src/app/swap/[id]/_components/SwapSteps/SwapStepValue.tsx similarity index 97% rename from app/swap/[id]/_components/SwapSteps/SwapStepValue.tsx rename to src/app/swap/[id]/_components/SwapSteps/SwapStepValue.tsx index 4c0e673..66d29d1 100644 --- a/app/swap/[id]/_components/SwapSteps/SwapStepValue.tsx +++ b/src/app/swap/[id]/_components/SwapSteps/SwapStepValue.tsx @@ -1,4 +1,4 @@ -import { SecondsTohms } from 'utils/secondsTohms'; +import { SecondsTohms } from 'src/utils/secondsTohms'; import dayjs from 'dayjs'; import utc from 'dayjs/plugin/utc'; import { SwapStepItemValueProps } from './SwapSteps.type'; diff --git a/app/swap/[id]/_components/SwapSteps/SwapSteps.helper.ts b/src/app/swap/[id]/_components/SwapSteps/SwapSteps.helper.ts similarity index 100% rename from app/swap/[id]/_components/SwapSteps/SwapSteps.helper.ts rename to src/app/swap/[id]/_components/SwapSteps/SwapSteps.helper.ts diff --git a/app/swap/[id]/_components/SwapSteps/SwapSteps.type.ts b/src/app/swap/[id]/_components/SwapSteps/SwapSteps.type.ts similarity index 98% rename from app/swap/[id]/_components/SwapSteps/SwapSteps.type.ts rename to src/app/swap/[id]/_components/SwapSteps/SwapSteps.type.ts index b1d552f..82d8709 100644 --- a/app/swap/[id]/_components/SwapSteps/SwapSteps.type.ts +++ b/src/app/swap/[id]/_components/SwapSteps/SwapSteps.type.ts @@ -1,4 +1,4 @@ -import { AssetType, ExplorerUrlsType, StepType, SwapStatus } from 'types'; +import { AssetType, ExplorerUrlsType, StepType, SwapStatus } from 'src/types'; export interface PropsType { steps: StepType[]; diff --git a/app/swap/[id]/_components/SwapSteps/TransactionURL.tsx b/src/app/swap/[id]/_components/SwapSteps/TransactionURL.tsx similarity index 85% rename from app/swap/[id]/_components/SwapSteps/TransactionURL.tsx rename to src/app/swap/[id]/_components/SwapSteps/TransactionURL.tsx index 4914ed6..4d96bff 100644 --- a/app/swap/[id]/_components/SwapSteps/TransactionURL.tsx +++ b/src/app/swap/[id]/_components/SwapSteps/TransactionURL.tsx @@ -1,12 +1,12 @@ import React from 'react'; -import IconStatus from 'components/common/IconStatus'; +import IconStatus from 'src/components/common/IconStatus'; import { TransactionURLProps } from './SwapSteps.type'; -import { SwapStatus } from 'types'; -import ButtonCopyIcon from 'components/common/ButtonCopyIcon'; -import { LinkIcon } from 'components/icons'; +import { SwapStatus } from 'src/types'; +import ButtonCopyIcon from 'src/components/common/ButtonCopyIcon'; +import { LinkIcon } from 'src/components/icons'; import TransactionURLMobileItem from './TransactionURLMobileItem'; -import { CapitalizeFirstLetter } from 'utils/capitalizeFirstLetter'; -import Tooltip from 'components/common/Tooltip'; +import { CapitalizeFirstLetter } from 'src/utils/capitalizeFirstLetter'; +import Tooltip from 'src/components/common/Tooltip'; import Link from 'next/link'; function TransactionURL(props: TransactionURLProps) { diff --git a/app/swap/[id]/_components/SwapSteps/TransactionURLMobileItem.tsx b/src/app/swap/[id]/_components/SwapSteps/TransactionURLMobileItem.tsx similarity index 94% rename from app/swap/[id]/_components/SwapSteps/TransactionURLMobileItem.tsx rename to src/app/swap/[id]/_components/SwapSteps/TransactionURLMobileItem.tsx index 9328662..f4abb8b 100644 --- a/app/swap/[id]/_components/SwapSteps/TransactionURLMobileItem.tsx +++ b/src/app/swap/[id]/_components/SwapSteps/TransactionURLMobileItem.tsx @@ -1,8 +1,8 @@ import React, { useEffect, useRef, useState } from 'react'; -import IconStatus from 'components/common/IconStatus'; +import IconStatus from 'src/components/common/IconStatus'; import { TransactionURLItemProps } from './SwapSteps.type'; -import { CopyIcon, InfoIcon, LinkIcon, MoreIcon } from 'components/icons'; -import { CopyText } from 'utils/common'; +import { CopyIcon, InfoIcon, LinkIcon, MoreIcon } from 'src/components/icons'; +import { CopyText } from 'src/utils/common'; import Link from 'next/link'; function TransactionURLMobileItem(props: TransactionURLItemProps) { diff --git a/app/swap/[id]/_components/SwapSteps/index.tsx b/src/app/swap/[id]/_components/SwapSteps/index.tsx similarity index 95% rename from app/swap/[id]/_components/SwapSteps/index.tsx rename to src/app/swap/[id]/_components/SwapSteps/index.tsx index 744f6c3..84dbc8f 100644 --- a/app/swap/[id]/_components/SwapSteps/index.tsx +++ b/src/app/swap/[id]/_components/SwapSteps/index.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { PropsType } from './SwapSteps.type'; import SwapStepItem from './SwapStepItem'; -import { StepType } from 'types'; +import { StepType } from 'src/types'; function SwapSteps(props: PropsType) { const { steps } = props; diff --git a/app/swap/[id]/page.tsx b/src/app/swap/[id]/page.tsx similarity index 92% rename from app/swap/[id]/page.tsx rename to src/app/swap/[id]/page.tsx index afa1543..bb1d9c3 100644 --- a/app/swap/[id]/page.tsx +++ b/src/app/swap/[id]/page.tsx @@ -1,7 +1,7 @@ -import { ChevronRightIcon } from 'components/icons'; +import { ChevronRightIcon } from 'src/components/icons'; import Link from 'next/link'; import { notFound } from 'next/navigation'; -import { getTxDetails } from 'services'; +import { getTxDetails } from 'src/services'; import SwapDetailSummary from './_components/SwapDetailSummary'; import SwapSteps from './_components/SwapSteps'; diff --git a/components/common/Button/Button.types.ts b/src/components/common/Button/Button.types.ts similarity index 100% rename from components/common/Button/Button.types.ts rename to src/components/common/Button/Button.types.ts diff --git a/components/common/Button/LinkButton.tsx b/src/components/common/Button/LinkButton.tsx similarity index 100% rename from components/common/Button/LinkButton.tsx rename to src/components/common/Button/LinkButton.tsx diff --git a/components/common/Button/index.tsx b/src/components/common/Button/index.tsx similarity index 100% rename from components/common/Button/index.tsx rename to src/components/common/Button/index.tsx diff --git a/components/common/ButtonCopyIcon/ButtonCopyIcon.type.ts b/src/components/common/ButtonCopyIcon/ButtonCopyIcon.type.ts similarity index 100% rename from components/common/ButtonCopyIcon/ButtonCopyIcon.type.ts rename to src/components/common/ButtonCopyIcon/ButtonCopyIcon.type.ts diff --git a/components/common/ButtonCopyIcon/index.tsx b/src/components/common/ButtonCopyIcon/index.tsx similarity index 92% rename from components/common/ButtonCopyIcon/index.tsx rename to src/components/common/ButtonCopyIcon/index.tsx index 84b3de7..34d7eb8 100644 --- a/components/common/ButtonCopyIcon/index.tsx +++ b/src/components/common/ButtonCopyIcon/index.tsx @@ -1,8 +1,8 @@ 'use client'; -import { CopyIcon, CheckIcon } from 'components/icons'; +import { CopyIcon, CheckIcon } from 'src/components/icons'; import { PropsType } from './ButtonCopyIcon.type'; -import { CopyText } from 'utils/common'; +import { CopyText } from 'src/utils/common'; import { useState } from 'react'; import Tooltip from '../Tooltip'; diff --git a/components/common/Footer/Footer.constants.ts b/src/components/common/Footer/Footer.constants.ts similarity index 98% rename from components/common/Footer/Footer.constants.ts rename to src/components/common/Footer/Footer.constants.ts index 454211c..8823945 100644 --- a/components/common/Footer/Footer.constants.ts +++ b/src/components/common/Footer/Footer.constants.ts @@ -5,7 +5,7 @@ import { TelegramIcon, TwitterIcon, YoutubeIcon, -} from 'components/icons'; +} from 'src/components/icons'; import { ListItemProps } from './Footer.type'; export const products: ListItemProps[] = [ diff --git a/components/common/Footer/Footer.type.ts b/src/components/common/Footer/Footer.type.ts similarity index 100% rename from components/common/Footer/Footer.type.ts rename to src/components/common/Footer/Footer.type.ts diff --git a/components/common/Footer/ListItem.tsx b/src/components/common/Footer/ListItem.tsx similarity index 100% rename from components/common/Footer/ListItem.tsx rename to src/components/common/Footer/ListItem.tsx diff --git a/components/common/Footer/index.tsx b/src/components/common/Footer/index.tsx similarity index 100% rename from components/common/Footer/index.tsx rename to src/components/common/Footer/index.tsx diff --git a/components/common/Header/DesktopHeader.tsx b/src/components/common/Header/DesktopHeader.tsx similarity index 100% rename from components/common/Header/DesktopHeader.tsx rename to src/components/common/Header/DesktopHeader.tsx diff --git a/components/common/Header/Header.helper.ts b/src/components/common/Header/Header.helper.ts similarity index 97% rename from components/common/Header/Header.helper.ts rename to src/components/common/Header/Header.helper.ts index 08f159e..e59b61a 100644 --- a/components/common/Header/Header.helper.ts +++ b/src/components/common/Header/Header.helper.ts @@ -3,7 +3,7 @@ import { ApiManagementIcon, DocsIcon, WidgetIcon, -} from 'components/icons'; +} from 'src/components/icons'; import { LinkTypes, MenuTypes } from './Header'; export const getSearchInputVisibility = (pathname: string) => { diff --git a/components/common/Header/Header.ts b/src/components/common/Header/Header.ts similarity index 100% rename from components/common/Header/Header.ts rename to src/components/common/Header/Header.ts diff --git a/components/common/Header/Menu.tsx b/src/components/common/Header/Menu.tsx similarity index 100% rename from components/common/Header/Menu.tsx rename to src/components/common/Header/Menu.tsx diff --git a/components/common/Header/MobileHeader.tsx b/src/components/common/Header/MobileHeader.tsx similarity index 98% rename from components/common/Header/MobileHeader.tsx rename to src/components/common/Header/MobileHeader.tsx index 890649d..8aae4e4 100644 --- a/components/common/Header/MobileHeader.tsx +++ b/src/components/common/Header/MobileHeader.tsx @@ -8,7 +8,7 @@ import { DeviceProps } from './Header'; import MobileMenu from './MobileMenu'; import { useEffect, useState } from 'react'; import { usePathname } from 'next/navigation'; -import { SearchIcon } from 'components/icons'; +import { SearchIcon } from 'src/components/icons'; import SearchInput from '../SearchBox/SearchInput'; import { getSearchInputVisibility } from './Header.helper'; diff --git a/components/common/Header/MobileMenu.tsx b/src/components/common/Header/MobileMenu.tsx similarity index 100% rename from components/common/Header/MobileMenu.tsx rename to src/components/common/Header/MobileMenu.tsx diff --git a/components/common/Header/index.tsx b/src/components/common/Header/index.tsx similarity index 100% rename from components/common/Header/index.tsx rename to src/components/common/Header/index.tsx diff --git a/components/common/IconStatus/IconStatus.helper.ts b/src/components/common/IconStatus/IconStatus.helper.ts similarity index 89% rename from components/common/IconStatus/IconStatus.helper.ts rename to src/components/common/IconStatus/IconStatus.helper.ts index 63c1f09..13d7bdd 100644 --- a/components/common/IconStatus/IconStatus.helper.ts +++ b/src/components/common/IconStatus/IconStatus.helper.ts @@ -1,4 +1,4 @@ -import { FailIcon, RunningIcon, SuccessIcon } from 'components/icons'; +import { FailIcon, RunningIcon, SuccessIcon } from 'src/components/icons'; import { StatusInfoType } from './IconStatus.type'; export const StatusInfo: StatusInfoType = { diff --git a/components/common/IconStatus/IconStatus.type.ts b/src/components/common/IconStatus/IconStatus.type.ts similarity index 88% rename from components/common/IconStatus/IconStatus.type.ts rename to src/components/common/IconStatus/IconStatus.type.ts index 5cf1e02..cb8f456 100644 --- a/components/common/IconStatus/IconStatus.type.ts +++ b/src/components/common/IconStatus/IconStatus.type.ts @@ -1,4 +1,4 @@ -import { SwapStatus } from 'types'; +import { SwapStatus } from 'src/types'; import { SvgIconProps } from '../SvgIcon'; export interface PropsType { diff --git a/components/common/IconStatus/index.tsx b/src/components/common/IconStatus/index.tsx similarity index 100% rename from components/common/IconStatus/index.tsx rename to src/components/common/IconStatus/index.tsx diff --git a/components/common/Modal/Modal.types.ts b/src/components/common/Modal/Modal.types.ts similarity index 100% rename from components/common/Modal/Modal.types.ts rename to src/components/common/Modal/Modal.types.ts diff --git a/components/common/Modal/index.tsx b/src/components/common/Modal/index.tsx similarity index 97% rename from components/common/Modal/index.tsx rename to src/components/common/Modal/index.tsx index 402621c..bc92a01 100644 --- a/components/common/Modal/index.tsx +++ b/src/components/common/Modal/index.tsx @@ -4,7 +4,7 @@ import React, { useEffect, useState } from 'react'; import { createPortal } from 'react-dom'; import { PropTypes } from './Modal.types'; -import { CloseIcon } from 'components/icons'; +import { CloseIcon } from 'src/components/icons'; const CLOSED_DELAY = 400; const OPEN_DELAY = 100; diff --git a/components/common/RefreshButton/RefreshButton.type.ts b/src/components/common/RefreshButton/RefreshButton.type.ts similarity index 100% rename from components/common/RefreshButton/RefreshButton.type.ts rename to src/components/common/RefreshButton/RefreshButton.type.ts diff --git a/components/common/RefreshButton/RefreshProgressButton.tsx b/src/components/common/RefreshButton/RefreshProgressButton.tsx similarity index 100% rename from components/common/RefreshButton/RefreshProgressButton.tsx rename to src/components/common/RefreshButton/RefreshProgressButton.tsx diff --git a/components/common/RefreshButton/index.tsx b/src/components/common/RefreshButton/index.tsx similarity index 100% rename from components/common/RefreshButton/index.tsx rename to src/components/common/RefreshButton/index.tsx diff --git a/components/common/ReloadButton/index.tsx b/src/components/common/ReloadButton/index.tsx similarity index 100% rename from components/common/ReloadButton/index.tsx rename to src/components/common/ReloadButton/index.tsx diff --git a/components/common/SearchBox/SearchInput.tsx b/src/components/common/SearchBox/SearchInput.tsx similarity index 97% rename from components/common/SearchBox/SearchInput.tsx rename to src/components/common/SearchBox/SearchInput.tsx index e418707..9ab46e3 100644 --- a/components/common/SearchBox/SearchInput.tsx +++ b/src/components/common/SearchBox/SearchInput.tsx @@ -3,7 +3,7 @@ import { useRouter } from 'next/navigation'; import { FormEvent, MouseEvent, useEffect, useRef, useState } from 'react'; import { Button } from '../Button'; -import { CloseIcon, PasteIcon, SearchIcon } from 'components/icons'; +import { CloseIcon, PasteIcon, SearchIcon } from 'src/components/icons'; import { PropTypes } from './SearchInput.type'; const BLUR_DELAY = 300; diff --git a/components/common/SearchBox/SearchInput.type.ts b/src/components/common/SearchBox/SearchInput.type.ts similarity index 100% rename from components/common/SearchBox/SearchInput.type.ts rename to src/components/common/SearchBox/SearchInput.type.ts diff --git a/components/common/SearchBox/index.tsx b/src/components/common/SearchBox/index.tsx similarity index 100% rename from components/common/SearchBox/index.tsx rename to src/components/common/SearchBox/index.tsx diff --git a/components/common/Select/Select.types.ts b/src/components/common/Select/Select.types.ts similarity index 100% rename from components/common/Select/Select.types.ts rename to src/components/common/Select/Select.types.ts diff --git a/components/common/Select/index.tsx b/src/components/common/Select/index.tsx similarity index 97% rename from components/common/Select/index.tsx rename to src/components/common/Select/index.tsx index 9d29dc9..bf944b1 100644 --- a/components/common/Select/index.tsx +++ b/src/components/common/Select/index.tsx @@ -1,6 +1,6 @@ import { SelectProps } from './Select.types'; import { useEffect, useRef, useState } from 'react'; -import { ChevronDownIcon, ChevronUpIcon } from 'components/icons'; +import { ChevronDownIcon, ChevronUpIcon } from 'src/components/icons'; export function Select(props: SelectProps) { const { className, label, options, selected, onSelect } = props; diff --git a/components/common/SelectBlockchain/SelectBlockchainProps.types.ts b/src/components/common/SelectBlockchain/SelectBlockchainProps.types.ts similarity index 77% rename from components/common/SelectBlockchain/SelectBlockchainProps.types.ts rename to src/components/common/SelectBlockchain/SelectBlockchainProps.types.ts index 3a9bbd5..c226bbb 100644 --- a/components/common/SelectBlockchain/SelectBlockchainProps.types.ts +++ b/src/components/common/SelectBlockchain/SelectBlockchainProps.types.ts @@ -1,4 +1,4 @@ -import { BlockchainMeta } from 'types/meta'; +import { BlockchainMeta } from 'src/types/meta'; export type SelectBlockchainProps = { options: BlockchainMeta[]; diff --git a/components/common/SelectBlockchain/index.tsx b/src/components/common/SelectBlockchain/index.tsx similarity index 98% rename from components/common/SelectBlockchain/index.tsx rename to src/components/common/SelectBlockchain/index.tsx index ce529e2..ae9270d 100644 --- a/components/common/SelectBlockchain/index.tsx +++ b/src/components/common/SelectBlockchain/index.tsx @@ -7,8 +7,8 @@ import { ChevronUpIcon, CloseIcon, SearchIcon, -} from 'components/icons'; -import { containsText } from 'utils/common'; +} from 'src/components/icons'; +import { containsText } from 'src/utils/common'; export function SelectBlockchain(props: SelectBlockchainProps) { const { className, label, options, selected, onSelect } = props; diff --git a/components/common/SvgIcon/SvgIcon.tsx b/src/components/common/SvgIcon/SvgIcon.tsx similarity index 100% rename from components/common/SvgIcon/SvgIcon.tsx rename to src/components/common/SvgIcon/SvgIcon.tsx diff --git a/components/common/SvgIcon/SvgIcon.types.ts b/src/components/common/SvgIcon/SvgIcon.types.ts similarity index 100% rename from components/common/SvgIcon/SvgIcon.types.ts rename to src/components/common/SvgIcon/SvgIcon.types.ts diff --git a/components/common/SvgIcon/index.ts b/src/components/common/SvgIcon/index.ts similarity index 100% rename from components/common/SvgIcon/index.ts rename to src/components/common/SvgIcon/index.ts diff --git a/components/common/Table/Table.helper.ts b/src/components/common/Table/Table.helper.ts similarity index 100% rename from components/common/Table/Table.helper.ts rename to src/components/common/Table/Table.helper.ts diff --git a/components/common/Table/Table.type.ts b/src/components/common/Table/Table.type.ts similarity index 90% rename from components/common/Table/Table.type.ts rename to src/components/common/Table/Table.type.ts index fdc3c97..c7bc59f 100644 --- a/components/common/Table/Table.type.ts +++ b/src/components/common/Table/Table.type.ts @@ -1,4 +1,4 @@ -import { SwapType } from 'types'; +import { SwapType } from 'src/types'; export interface TableProps { data: SwapType[]; diff --git a/components/common/Table/TableBody.tsx b/src/components/common/Table/TableBody.tsx similarity index 100% rename from components/common/Table/TableBody.tsx rename to src/components/common/Table/TableBody.tsx diff --git a/components/common/Table/TableHead.tsx b/src/components/common/Table/TableHead.tsx similarity index 100% rename from components/common/Table/TableHead.tsx rename to src/components/common/Table/TableHead.tsx diff --git a/components/common/Table/cells/AmountCell.tsx b/src/components/common/Table/cells/AmountCell.tsx similarity index 95% rename from components/common/Table/cells/AmountCell.tsx rename to src/components/common/Table/cells/AmountCell.tsx index e237805..b721f28 100644 --- a/components/common/Table/cells/AmountCell.tsx +++ b/src/components/common/Table/cells/AmountCell.tsx @@ -1,6 +1,6 @@ -import { GassIcon } from 'components/icons'; +import { GassIcon } from 'src/components/icons'; import { CellProps } from '../Table.type'; -import { getPercentageChange } from 'utils/amountConverter'; +import { getPercentageChange } from 'src/utils/amountConverter'; function AmountCell(props: CellProps) { const { swapItem, column } = props; diff --git a/components/common/Table/cells/RequestIDCell.tsx b/src/components/common/Table/cells/RequestIDCell.tsx similarity index 91% rename from components/common/Table/cells/RequestIDCell.tsx rename to src/components/common/Table/cells/RequestIDCell.tsx index f97cec2..99fd410 100644 --- a/components/common/Table/cells/RequestIDCell.tsx +++ b/src/components/common/Table/cells/RequestIDCell.tsx @@ -1,8 +1,8 @@ import dayjs from 'dayjs'; import utc from 'dayjs/plugin/utc'; import { CellProps } from '../Table.type'; -import ButtonCopyIcon from 'components/common/ButtonCopyIcon'; -import Tooltip from 'components/common/Tooltip'; +import ButtonCopyIcon from 'src/components/common/ButtonCopyIcon'; +import Tooltip from 'src/components/common/Tooltip'; import Link from 'next/link'; dayjs.extend(utc); diff --git a/components/common/Table/cells/StatusCell.tsx b/src/components/common/Table/cells/StatusCell.tsx similarity index 90% rename from components/common/Table/cells/StatusCell.tsx rename to src/components/common/Table/cells/StatusCell.tsx index d0ea615..fac4bb5 100644 --- a/components/common/Table/cells/StatusCell.tsx +++ b/src/components/common/Table/cells/StatusCell.tsx @@ -1,8 +1,8 @@ /* eslint-disable @next/next/no-img-element */ -import { StepsIcon } from 'components/icons'; +import { StepsIcon } from 'src/components/icons'; import { CellProps } from '../Table.type'; -import IconStatus from 'components/common/IconStatus'; -import Tooltip from 'components/common/Tooltip'; +import IconStatus from 'src/components/common/IconStatus'; +import Tooltip from 'src/components/common/Tooltip'; function StatusCell(props: CellProps) { const { swapItem, column } = props; diff --git a/components/common/Table/cells/TokenCell.tsx b/src/components/common/Table/cells/TokenCell.tsx similarity index 97% rename from components/common/Table/cells/TokenCell.tsx rename to src/components/common/Table/cells/TokenCell.tsx index e311286..4693a91 100644 --- a/components/common/Table/cells/TokenCell.tsx +++ b/src/components/common/Table/cells/TokenCell.tsx @@ -1,5 +1,5 @@ /* eslint-disable @next/next/no-img-element */ -import { DEFAULT_TOKEN_LOGO } from 'constant'; +import { DEFAULT_TOKEN_LOGO } from 'src/constant'; import { CellProps } from '../Table.type'; function TokenCell(props: CellProps) { diff --git a/components/common/Table/index.tsx b/src/components/common/Table/index.tsx similarity index 100% rename from components/common/Table/index.tsx rename to src/components/common/Table/index.tsx diff --git a/components/common/Tooltip/Tooltip.type.ts b/src/components/common/Tooltip/Tooltip.type.ts similarity index 100% rename from components/common/Tooltip/Tooltip.type.ts rename to src/components/common/Tooltip/Tooltip.type.ts diff --git a/components/common/Tooltip/index.tsx b/src/components/common/Tooltip/index.tsx similarity index 100% rename from components/common/Tooltip/index.tsx rename to src/components/common/Tooltip/index.tsx diff --git a/components/common/media.tsx b/src/components/common/media.tsx similarity index 100% rename from components/common/media.tsx rename to src/components/common/media.tsx diff --git a/components/icons/ActiveFilter.tsx b/src/components/icons/ActiveFilter.tsx similarity index 100% rename from components/icons/ActiveFilter.tsx rename to src/components/icons/ActiveFilter.tsx diff --git a/components/icons/Affiliate.tsx b/src/components/icons/Affiliate.tsx similarity index 100% rename from components/icons/Affiliate.tsx rename to src/components/icons/Affiliate.tsx diff --git a/components/icons/ApiManagement.tsx b/src/components/icons/ApiManagement.tsx similarity index 100% rename from components/icons/ApiManagement.tsx rename to src/components/icons/ApiManagement.tsx diff --git a/components/icons/Check.tsx b/src/components/icons/Check.tsx similarity index 100% rename from components/icons/Check.tsx rename to src/components/icons/Check.tsx diff --git a/components/icons/ChevronDown.tsx b/src/components/icons/ChevronDown.tsx similarity index 100% rename from components/icons/ChevronDown.tsx rename to src/components/icons/ChevronDown.tsx diff --git a/components/icons/ChevronRight.tsx b/src/components/icons/ChevronRight.tsx similarity index 100% rename from components/icons/ChevronRight.tsx rename to src/components/icons/ChevronRight.tsx diff --git a/components/icons/ChevronUp.tsx b/src/components/icons/ChevronUp.tsx similarity index 100% rename from components/icons/ChevronUp.tsx rename to src/components/icons/ChevronUp.tsx diff --git a/components/icons/Close.tsx b/src/components/icons/Close.tsx similarity index 100% rename from components/icons/Close.tsx rename to src/components/icons/Close.tsx diff --git a/components/icons/Copy.tsx b/src/components/icons/Copy.tsx similarity index 100% rename from components/icons/Copy.tsx rename to src/components/icons/Copy.tsx diff --git a/components/icons/Discord.tsx b/src/components/icons/Discord.tsx similarity index 100% rename from components/icons/Discord.tsx rename to src/components/icons/Discord.tsx diff --git a/components/icons/Docs.tsx b/src/components/icons/Docs.tsx similarity index 100% rename from components/icons/Docs.tsx rename to src/components/icons/Docs.tsx diff --git a/components/icons/Fail.tsx b/src/components/icons/Fail.tsx similarity index 100% rename from components/icons/Fail.tsx rename to src/components/icons/Fail.tsx diff --git a/components/icons/Filter.tsx b/src/components/icons/Filter.tsx similarity index 100% rename from components/icons/Filter.tsx rename to src/components/icons/Filter.tsx diff --git a/components/icons/FirstPage.tsx b/src/components/icons/FirstPage.tsx similarity index 100% rename from components/icons/FirstPage.tsx rename to src/components/icons/FirstPage.tsx diff --git a/components/icons/Gass.tsx b/src/components/icons/Gass.tsx similarity index 100% rename from components/icons/Gass.tsx rename to src/components/icons/Gass.tsx diff --git a/components/icons/Github.tsx b/src/components/icons/Github.tsx similarity index 100% rename from components/icons/Github.tsx rename to src/components/icons/Github.tsx diff --git a/components/icons/Info.tsx b/src/components/icons/Info.tsx similarity index 100% rename from components/icons/Info.tsx rename to src/components/icons/Info.tsx diff --git a/components/icons/LastPage.tsx b/src/components/icons/LastPage.tsx similarity index 100% rename from components/icons/LastPage.tsx rename to src/components/icons/LastPage.tsx diff --git a/components/icons/Link.tsx b/src/components/icons/Link.tsx similarity index 100% rename from components/icons/Link.tsx rename to src/components/icons/Link.tsx diff --git a/components/icons/Loading.tsx b/src/components/icons/Loading.tsx similarity index 100% rename from components/icons/Loading.tsx rename to src/components/icons/Loading.tsx diff --git a/components/icons/Medium.tsx b/src/components/icons/Medium.tsx similarity index 100% rename from components/icons/Medium.tsx rename to src/components/icons/Medium.tsx diff --git a/components/icons/More.tsx b/src/components/icons/More.tsx similarity index 100% rename from components/icons/More.tsx rename to src/components/icons/More.tsx diff --git a/components/icons/Next.tsx b/src/components/icons/Next.tsx similarity index 100% rename from components/icons/Next.tsx rename to src/components/icons/Next.tsx diff --git a/components/icons/NextPage.tsx b/src/components/icons/NextPage.tsx similarity index 100% rename from components/icons/NextPage.tsx rename to src/components/icons/NextPage.tsx diff --git a/components/icons/Paste.tsx b/src/components/icons/Paste.tsx similarity index 100% rename from components/icons/Paste.tsx rename to src/components/icons/Paste.tsx diff --git a/components/icons/PrevPage.tsx b/src/components/icons/PrevPage.tsx similarity index 100% rename from components/icons/PrevPage.tsx rename to src/components/icons/PrevPage.tsx diff --git a/components/icons/Refresh.tsx b/src/components/icons/Refresh.tsx similarity index 100% rename from components/icons/Refresh.tsx rename to src/components/icons/Refresh.tsx diff --git a/components/icons/Running.tsx b/src/components/icons/Running.tsx similarity index 100% rename from components/icons/Running.tsx rename to src/components/icons/Running.tsx diff --git a/components/icons/Search.tsx b/src/components/icons/Search.tsx similarity index 100% rename from components/icons/Search.tsx rename to src/components/icons/Search.tsx diff --git a/components/icons/Steps.tsx b/src/components/icons/Steps.tsx similarity index 100% rename from components/icons/Steps.tsx rename to src/components/icons/Steps.tsx diff --git a/components/icons/Success.tsx b/src/components/icons/Success.tsx similarity index 100% rename from components/icons/Success.tsx rename to src/components/icons/Success.tsx diff --git a/components/icons/Telegram.tsx b/src/components/icons/Telegram.tsx similarity index 100% rename from components/icons/Telegram.tsx rename to src/components/icons/Telegram.tsx diff --git a/components/icons/Twitter.tsx b/src/components/icons/Twitter.tsx similarity index 100% rename from components/icons/Twitter.tsx rename to src/components/icons/Twitter.tsx diff --git a/components/icons/Widget.tsx b/src/components/icons/Widget.tsx similarity index 100% rename from components/icons/Widget.tsx rename to src/components/icons/Widget.tsx diff --git a/components/icons/Youtube.tsx b/src/components/icons/Youtube.tsx similarity index 100% rename from components/icons/Youtube.tsx rename to src/components/icons/Youtube.tsx diff --git a/components/icons/index.ts b/src/components/icons/index.ts similarity index 100% rename from components/icons/index.ts rename to src/components/icons/index.ts diff --git a/constant/index.ts b/src/constant/index.ts similarity index 90% rename from constant/index.ts rename to src/constant/index.ts index 7e30114..dbace79 100644 --- a/constant/index.ts +++ b/src/constant/index.ts @@ -1,4 +1,4 @@ -import { BreakDownList, StatisticDaysFilter } from 'types'; +import { BreakDownList, StatisticDaysFilter } from 'src/types'; export const MATCH_TYPE = { ADDRESS: 'ADDRESS', diff --git a/services/constants.ts b/src/services/constants.ts similarity index 100% rename from services/constants.ts rename to src/services/constants.ts diff --git a/services/index.ts b/src/services/index.ts similarity index 98% rename from services/index.ts rename to src/services/index.ts index a3e8fb2..1f82af2 100644 --- a/services/index.ts +++ b/src/services/index.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/explicit-function-return-type */ /* eslint-disable @typescript-eslint/restrict-template-expressions */ -import { DailySummaryOption } from 'types'; +import { DailySummaryOption } from 'src/types'; import { API_URL, SEARCH_RESULT_OFFSET } from '../constant'; import { SECONDS_PER_HOUR, SECONDS_PER_MINUTE } from './constants'; diff --git a/types/index.ts b/src/types/index.ts similarity index 100% rename from types/index.ts rename to src/types/index.ts diff --git a/types/meta.ts b/src/types/meta.ts similarity index 100% rename from types/meta.ts rename to src/types/meta.ts diff --git a/types/summary.ts b/src/types/summary.ts similarity index 100% rename from types/summary.ts rename to src/types/summary.ts diff --git a/types/transations.ts b/src/types/transations.ts similarity index 100% rename from types/transations.ts rename to src/types/transations.ts diff --git a/utils/amountConverter.ts b/src/utils/amountConverter.ts similarity index 100% rename from utils/amountConverter.ts rename to src/utils/amountConverter.ts diff --git a/utils/capitalizeFirstLetter.ts b/src/utils/capitalizeFirstLetter.ts similarity index 100% rename from utils/capitalizeFirstLetter.ts rename to src/utils/capitalizeFirstLetter.ts diff --git a/utils/common.ts b/src/utils/common.ts similarity index 100% rename from utils/common.ts rename to src/utils/common.ts diff --git a/utils/secondsTohms.ts b/src/utils/secondsTohms.ts similarity index 100% rename from utils/secondsTohms.ts rename to src/utils/secondsTohms.ts diff --git a/styles/globals.css b/styles/globals.css deleted file mode 100644 index 7e189ba..0000000 --- a/styles/globals.css +++ /dev/null @@ -1,249 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; - -@layer base { - @font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: normal; - font-display: swap; - src: - local('Roboto Regular'), - url('/fonts/Roboto-Regular.ttf') format('truetype'); - } - - @font-face { - font-family: 'Roboto'; - font-style: italic; - font-weight: normal; - font-display: swap; - src: - local('Roboto Italic'), - url('/fonts/Roboto-Italic.ttf') format('truetype'); - } - - @font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 100; - font-display: swap; - src: - local('Roboto Thin'), - url('/fonts/Roboto-Thin.ttf') format('truetype'); - } - - @font-face { - font-family: 'Roboto'; - font-style: italic; - font-weight: 100; - font-display: swap; - src: - local('Roboto Thin Italic'), - url('/fonts/Roboto-ThinItalic.ttf') format('truetype'); - } - - @font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 300; - font-display: swap; - src: - local('Roboto Light'), - url('/fonts/Roboto-Light.ttf') format('truetype'); - } - - @font-face { - font-family: 'Roboto'; - font-style: italic; - font-weight: 300; - font-display: swap; - src: - local('Roboto Light Italic'), - url('/fonts/Roboto-LightItalic.ttf') format('truetype'); - } - - @font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 400; - font-display: swap; - src: - local('Roboto Light'), - url('/fonts/Roboto-Regular.ttf') format('truetype'); - } - - - @font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 500; - font-display: swap; - src: - local('Roboto Bold'), - url('/fonts/Roboto-Medium.ttf') format('truetype'); - } - - @font-face { - font-family: 'Roboto'; - font-style: italic; - font-weight: 500; - font-display: swap; - src: - local('Roboto Bold Italic'), - url('/fonts/Roboto-MediumItalic.ttf') format('truetype'); - } - - @font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 600; - font-display: swap; - src: - local('Roboto Bold'), - url('/fonts/Roboto-Bold.ttf') format('truetype'); - } - - @font-face { - font-family: 'Roboto'; - font-style: italic; - font-weight: 600; - font-display: swap; - src: - local('Roboto Bold Italic'), - url('/fonts/Roboto-BoldItalic.ttf') format('truetype'); - } - - @font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: bold; - font-display: swap; - src: - local('Roboto Bold'), - url('/fonts/Roboto-Bold.ttf') format('truetype'); - } - - @font-face { - font-family: 'Roboto'; - font-style: italic; - font-weight: bold; - font-display: swap; - src: - local('Roboto Bold Italic'), - url('/fonts/Roboto-BoldItalic.ttf') format('truetype'); - } - - @font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 1000; - font-display: swap; - src: - local('Roboto Black'), - url('/fonts/Roboto-Black.ttf') format('truetype'); - } - - @font-face { - font-family: 'Roboto'; - font-style: italic; - font-weight: 1000; - font-display: swap; - src: - local('Roboto Black Italic'), - url('/fonts/Roboto-BlackItalic.ttf') format('truetype'); - } -} - -html, -body, -#__next { - height: 100%; -} - -span.ripple { - position: absolute; - border-radius: 50%; - transform: scale(0); - animation: ripple 600ms linear; - background-color: rgba(255, 255, 255, 0.7); -} -@keyframes ripple { - to { - transform: scale(4); - opacity: 0; - } -} - -.animate-modal { - transition-timing-function: cubic-bezier(10, 2, 3, 1); - transform: translateY(50rem); - transition: 0.5s; -} - -.animate-mount-modal { - transform: translateY(0rem); -} - -.animate-menu { - transition-timing-function: cubic-bezier(10, 2, 3, 1); - transform: translateX(50rem); - transition: 0.5s; -} - -.animate-mount-menu { - transform: translateX(0rem); -} - -.slick-slide > div { - margin: 0 3%; -} -.slick-list { - margin: 0 -3%; -} - -* { - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -.text-3d { - text-shadow: - 1px 1px 1px #dea873, - 1px 2px 1px #dea873, - 1px 3px 1px #ba7331; -} - -.bg-orange-1 { - background: #ff9600; -} - -.mask-2 { - -webkit-background-size: 100% 100%; -} - -.visx-tooltip-glyph svg{ - width: 40px; - height: 40px; -} - -.rango-statistic-sankey-chart{ - height: 100% !important; - width: 100% !important; -} - -.animate-modal { - transition-timing-function: cubic-bezier(10, 2, 3, 1); - transform: translateY(50rem); - transition: 0.5s; -} - -.animate-mount-modal { - transform: translateY(0rem); -} - -@-moz-document url-prefix() { - .mask-2 { - background-size: 100% 100%; - } -} diff --git a/tailwind.config.js b/tailwind.config.js index ea1decb..8ad8c6c 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,9 +1,6 @@ module.exports = { darkMode: 'false', - content: [ - './app/**/*.{js,ts,jsx,tsx,mdx}', - './components/**/*.{js,ts,jsx,tsx,mdx}', - ], + content: ['./src/**/*.{js,ts,jsx,tsx,mdx}'], theme: { borderWidth: { DEFAULT: '1px', diff --git a/tsconfig.json b/tsconfig.json index 95965dd..d381e3e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -26,7 +26,6 @@ "next-env.d.ts", "**/*.ts", "**/*.tsx", - "components/home/Summary/SummaryItem.tss", "next.config.js", "tailwind.config.js", "postcss.config.js",