From 391da3d5aad320d68f1c35ccb7d43956ce8c15a2 Mon Sep 17 00:00:00 2001 From: He1DAr Date: Tue, 14 Nov 2023 13:37:17 -0500 Subject: [PATCH] feat: upgrade next.js 14 --- Dockerfile | 4 +- next-env.d.ts | 1 + package.json | 3 +- pnpm-lock.yaml | 300 ++++++++---------- src/app/init.ts | 39 +++ src/app/layout.tsx | 30 +- src/app/test/error.tsx | 47 +++ src/app/test/head.tsx | 12 + src/app/test/layout.tsx | 45 +++ src/app/test/loading.tsx | 3 + src/app/test/page.tsx | 12 + src/{app => appPages}/DefaultHeadTags.tsx | 0 src/{app => appPages}/HomeClient.tsx | 2 +- src/{app => appPages}/PageWrapper.tsx | 2 +- src/{app => appPages}/Providers.tsx | 17 +- .../address/[principal]/error.tsx | 0 .../address/[principal]/head.tsx | 0 .../address/[principal]/page.tsx | 6 +- src/{app => appPages}/block/[hash]/error.tsx | 0 src/{app => appPages}/block/[hash]/head.tsx | 0 src/{app => appPages}/block/[hash]/page.tsx | 2 +- .../block/[hash]/tx-lists/BlockTxsList.tsx | 0 src/{app => appPages}/blocks/head.tsx | 0 src/{app => appPages}/blocks/loading.tsx | 0 src/{app => appPages}/blocks/page.tsx | 2 +- src/{app => appPages}/common/claritySyntax.ts | 0 .../components/ContractAvailableFunctions.tsx | 10 +- .../common/components/CopyButton.tsx | 0 .../common/components/KeyValueHorizontal.tsx | 0 .../common/components/KeyValueVertical.tsx | 0 .../common/components/ListItem.tsx | 0 .../common/components/PageTitle.tsx | 0 .../components/StxPriceButton/index.tsx | 0 .../StxPriceButton/useStxPriceForTx.ts | 0 .../common/components/TabsContainer.tsx | 0 .../common/components/TwoColumnPage.tsx | 0 .../common/components/TxIcon.tsx | 0 .../common/components/Value.tsx | 0 .../__tests__/TabsContainer.test.tsx | 0 .../skeletons/SSRSkeletonBlockList.tsx | 0 .../skeletons/SSRSkeletonTxList.tsx | 0 .../address-lists/AddressConfirmedTxsList.tsx | 0 .../address-lists/AddressMempoolTxsList.tsx | 0 .../common/components/FilteredTxs.tsx | 0 .../tx-lists/common/types/transfers.ts | 0 .../components/tx-lists/common/utils/tx.tsx | 2 +- .../default-lists/ConfirmedTxsList.tsx | 0 .../tx-lists/default-lists/MempoolTxsList.tsx | 0 .../tx-lists/list-items/FtTransfers.tsx | 2 +- .../tx-lists/list-items/MempoolTxListItem.tsx | 2 +- .../list-items/MempoolTxListItemMini.tsx | 2 +- .../tx-lists/list-items/NftTransfers.tsx | 0 .../tx-lists/list-items/StxTransfers.tsx | 0 .../tx-lists/list-items/TransferListItem.tsx | 2 +- .../tx-lists/list-items/TxListItem.tsx | 2 +- .../tx-lists/list-items/TxListItemMini.tsx | 2 +- .../list-items/TxWithTransferListItem.tsx | 4 +- .../tx-lists/tabs/AddressTxListTabs.tsx | 0 .../tx-lists/tabs/DefaultTxListTabs.tsx | 0 .../components/tx-lists/tabs/TxListTabs.tsx | 2 +- .../tabs/__tests__/TxListTabs.test.tsx | 0 .../common/components/tx-lists/utils/tx.ts | 0 src/{app => appPages}/common/consts/head.ts | 0 .../common/hooks/use-current-prices.ts | 0 .../common/hooks/use-debounce.ts | 0 .../common/hooks/use-filter-state.tsx | 0 .../common/hooks/use-random-name.tsx | 0 .../common/hooks/use-stacks-network.ts | 0 .../common/hooks/useInfiniteQueryResult.ts | 0 .../common/queries/query-stale-time.ts | 0 .../common/queries/useAccountBalance.ts | 0 ...ddressConfirmedTxsWithTransfersInfinite.ts | 0 .../queries/useAddressMempoolTxsInfinite.ts | 0 .../common/queries/useAddressNonces.ts | 0 .../common/queries/useBlockByHash.ts | 0 .../common/queries/useBlockListInfinite.ts | 0 .../common/queries/useBlockTxsInfinite.ts | 0 .../useConfirmedTransactionsInfinite.ts | 0 .../common/queries/useContractById.ts | 0 .../common/queries/useCoreApiInfo.ts | 0 .../common/queries/useFtMetadata.ts | 0 .../queries/useMempoolTransactionsInfinite.ts | 0 .../common/queries/useMicroblockByHash.ts | 0 .../common/queries/useNftHoldings.ts | 0 .../common/queries/useNftMetadata.ts | 0 .../common/queries/useTxById.ts | 0 .../common/server-calls/fetchClaritySyntax.ts | 0 src/{app => appPages}/common/styles/border.ts | 0 .../utils/__tests__/validateUrl.test.ts | 0 .../common/utils/buildUrl.ts | 0 src/{app => appPages}/common/utils/head.ts | 0 src/{app => appPages}/common/utils/sandbox.ts | 0 .../common/utils/validateUrl.ts | 0 .../AnimatedBlockAndMicroblocksItem.tsx | 2 +- .../BlockList/BlockAndMicroblocksItem.tsx | 2 +- .../components/BlockList/BlockListItem.tsx | 0 .../BlockList/MicroblockListItem.tsx | 0 .../__tests__/BlocksListBase.test.tsx | 4 +- .../__tests__/MicroblockListItem.test.tsx | 0 .../MicroblockListItem.test.tsx.snap | 0 .../BlockList/hooks/useBlockList.ts | 0 .../components/BlockList/index.tsx | 6 +- .../components/BlockList/types.ts | 0 .../components/NavBar/DesktopNav.tsx | 0 .../components/NavBar/DesktopSubNav.tsx | 0 .../components/NavBar/Logo.tsx | 0 .../components/NavBar/MobileNav.tsx | 2 +- .../components/NavBar/MobileNavItem.tsx | 0 .../components/NavBar/NavLabel.tsx | 0 .../components/NavBar/NetworkLabel.tsx | 6 +- .../NavBar/__tests__/DesktopNav.test.tsx | 0 .../NavBar/__tests__/MobileNav.test.tsx | 0 .../NavBar/__tests__/NetworkLabel.test.tsx | 0 .../__snapshots__/DesktopNav.test.tsx.snap | 0 .../__snapshots__/MobileNav.test.tsx.snap | 0 .../NavBar/getCustomNetworkApiInfo.ts | 0 .../components/NavBar/index.tsx | 12 +- .../components/NavBar/types.ts | 0 src/{app => appPages}/error.tsx | 0 src/{app => appPages}/head.tsx | 0 src/appPages/layout.tsx | 26 ++ src/{app => appPages}/loading.tsx | 0 .../microblock/[hash]/error.tsx | 0 .../microblock/[hash]/head.tsx | 0 .../microblock/[hash]/page.tsx | 4 +- .../[hash]/tx-lists/MicroblockTxsList.tsx | 4 +- src/{app => appPages}/page.tsx | 2 +- .../components/Argument/ListArgumentInput.tsx | 0 .../Argument/PrimitiveArgumentInput.tsx | 0 .../Argument/TupleArgumentInput.tsx | 0 .../sandbox/components/Argument/index.tsx | 0 .../sandbox/components/Argument/types.ts | 0 .../sandbox/components/ClarityIcon.tsx | 0 .../ContractCall/AvailableFunctionsView.tsx | 2 +- .../DefaultView/PopularContracts.tsx | 0 .../DefaultView/SearchContractsForm.tsx | 2 +- .../ContractCall/DefaultView/index.tsx | 0 .../components/ContractCall/FunctionView.tsx | 2 +- .../components/ContractCall/ReadOnlyField.tsx | 0 .../ContractCall/SelectedContractView.tsx | 2 +- .../sandbox/components/Toolbar.tsx | 0 .../sandbox/components/TransactionsPanel.tsx | 2 +- .../contract-call/[[...params]]/page.tsx | 0 .../sandbox/deploy/DeployPage.tsx | 0 .../sandbox/deploy/LeftSection.tsx | 0 .../sandbox/deploy/RightSection.tsx | 0 src/{app => appPages}/sandbox/deploy/page.tsx | 0 .../sandbox/editor-config/autocomplete.ts | 0 .../editor-config/clarity-reference.ts | 0 .../sandbox/editor-config/define-theme.ts | 0 .../sandbox/editor-config/init.ts | 0 .../sandbox/editor-config/language.ts | 0 src/{app => appPages}/sandbox/faucet/page.tsx | 0 src/{app => appPages}/sandbox/head.tsx | 0 .../sandbox/hooks/useUser.ts | 0 src/{app => appPages}/sandbox/layout.tsx | 2 +- .../sandbox/layout/ConnectToStacks.tsx | 0 .../sandbox/layout/Header.tsx | 0 .../sandbox/layout/NavItem.tsx | 0 .../sandbox/layout/RightPanel.tsx | 2 +- .../sandbox/layout/SideNav.tsx | 2 +- .../sandbox/layout/SkeletonRightPanel.tsx | 2 +- .../sandbox/sandbox-slice.ts | 0 .../sandbox/transfer/page.tsx | 0 src/{app => appPages}/sandbox/types/values.ts | 0 src/{app => appPages}/sandbox/utils.ts | 0 .../stats/CurrentStackingCycle/index.tsx | 2 +- .../useCurrentStackingCycle.ts | 0 .../stats/LastBlock/index.tsx | 0 .../stats/NextStackingCycle/index.tsx | 2 +- .../NextStackingCycle/useNextStackingCycle.ts | 0 .../stats/SkeletonStatSection.tsx | 0 src/{app => appPages}/stats/StackingCycle.tsx | 0 src/{app => appPages}/stats/StatSection.tsx | 0 src/{app => appPages}/stats/Stats.tsx | 0 .../stats/StxSupply/index.tsx | 0 .../stats/StxSupply/useStxSupply.ts | 0 .../token/[tokenId]/LinksGroup.tsx | 2 +- .../token/[tokenId]/LinksMenu.tsx | 2 +- .../token/[tokenId]/Tabs/DeveloperStat.tsx | 0 .../token/[tokenId]/Tabs/Developers.tsx | 0 .../token/[tokenId]/Tabs/index.tsx | 14 +- .../token/[tokenId]/TokenInfo/MarketCap.tsx | 4 +- .../token/[tokenId]/TokenInfo/Price.tsx | 4 +- .../token/[tokenId]/TokenInfo/Supply.tsx | 2 +- .../token/[tokenId]/TokenInfo/Transaction.tsx | 2 +- .../token/[tokenId]/TokenInfo/TrendArrow.tsx | 0 .../token/[tokenId]/TokenInfo/index.tsx | 0 .../token/[tokenId]/__tests__/utils.test.ts | 0 .../token/[tokenId]/error.tsx | 4 +- .../token/[tokenId]/head.tsx | 0 .../token/[tokenId]/index.tsx | 2 +- .../token/[tokenId]/page.tsx | 2 +- .../token/[tokenId]/utils.ts | 0 .../tokens/TokenRow/index.tsx | 0 .../tokens/TokenRow/loading.tsx | 0 .../tokens/TokensList/TokensList.tsx | 4 +- .../tokens/TokensList/index.tsx | 0 .../tokens/TokensList/loading.tsx | 0 .../tokens/__tests__/TokenRow.test.tsx | 0 .../__snapshots__/TokenRow.test.tsx.snap | 0 .../tokens/__tests__/useTokens.test.tsx | 4 +- src/{app => appPages}/tokens/head.tsx | 0 src/{app => appPages}/tokens/page.tsx | 4 +- src/{app => appPages}/tokens/useFtTokens.ts | 2 +- src/{app => appPages}/tokens/useTokens.ts | 6 +- src/{app => appPages}/transactions/head.tsx | 0 .../transactions/loading.tsx | 2 +- src/{app => appPages}/transactions/page.tsx | 2 +- .../txid/TransactionPageComponent.tsx | 6 +- .../txid/[txid]/Cards/BtcAnchorBlockCard.tsx | 0 .../txid/[txid]/Cards/ContractDetailsCard.tsx | 0 .../txid/[txid]/CoinbasePage/TxDetails.tsx | 0 .../txid/[txid]/CoinbasePage/index.tsx | 0 .../txid/[txid]/ContractCall/TxDetails.tsx | 0 .../txid/[txid]/ContractCall/index.tsx | 2 +- .../[txid]/PoisonMicroblock/TxDetails.tsx | 0 .../txid/[txid]/PoisonMicroblock/index.tsx | 0 .../[txid]/SmartContractPage/ContractTabs.tsx | 4 +- .../[txid]/SmartContractPage/TxDetails.tsx | 0 .../txid/[txid]/SmartContractPage/index.tsx | 0 .../txid/[txid]/TokenTransfer/TxDetails.tsx | 0 .../txid/[txid]/TokenTransfer/index.tsx | 0 .../txid/[txid]/TxDetails/Amount.tsx | 0 .../txid/[txid]/TxDetails/BlockHash.tsx | 0 .../txid/[txid]/TxDetails/BlockHeight.tsx | 0 .../txid/[txid]/TxDetails/Broadcast.tsx | 0 .../txid/[txid]/TxDetails/ClarityVersion.tsx | 0 .../txid/[txid]/TxDetails/ContractName.tsx | 0 .../txid/[txid]/TxDetails/Fees.tsx | 0 .../txid/[txid]/TxDetails/ID.tsx | 0 .../txid/[txid]/TxDetails/Memo.tsx | 0 .../txid/[txid]/TxDetails/NonCanonical.tsx | 0 .../txid/[txid]/TxDetails/Nonce.tsx | 0 .../txid/[txid]/TxDetails/Recipient.tsx | 0 .../txid/[txid]/TxDetails/Sender.tsx | 0 .../TxDetails/__tests__/Broadcast.test.tsx | 0 .../__snapshots__/Broadcast.test.tsx.snap | 0 src/{app => appPages}/txid/[txid]/TxPage.tsx | 0 src/{app => appPages}/txid/[txid]/error.tsx | 4 +- src/{app => appPages}/txid/[txid]/head.tsx | 0 src/{app => appPages}/txid/[txid]/page.tsx | 2 +- src/{app => appPages}/txid/[txid]/utils.ts | 0 src/common/context/GlobalContext.tsx | 26 +- src/common/hooks/useTxsCSVData.ts | 2 +- src/common/state/store.ts | 2 +- src/components/app-config.tsx | 6 +- .../balances/principal-token-balances.tsx | 2 +- src/components/balances/stx-balance-card.tsx | 2 +- .../balances/token-asset-list-item.tsx | 4 +- src/components/btc-stx-price.tsx | 9 +- src/components/filter-button.tsx | 2 +- src/components/filter-panel.tsx | 2 +- src/components/footer.tsx | 2 +- src/components/function-summary/args.tsx | 2 +- .../function-summary/function-summary.tsx | 4 +- src/components/function-summary/value.tsx | 2 +- src/components/links.tsx | 2 +- .../loaders/skeleton-transaction.tsx | 18 +- .../modals/AddNetwork/AddNetworkForm.tsx | 2 +- src/components/network-items.tsx | 4 +- src/components/post-conditions.tsx | 6 +- src/components/timestamp.tsx | 2 +- src/components/transaction-item.tsx | 8 +- src/components/transaction-list.tsx | 2 +- src/components/tx-events.tsx | 6 +- src/components/tx-title.tsx | 2 +- src/features/address-page/address-summary.tsx | 6 +- src/features/blocks-visualizer/index.tsx | 4 +- .../search/items/block-result-item.tsx | 2 +- .../search/items/result-item-wrapper.tsx | 2 +- src/features/search/items/tx-result-item.tsx | 4 +- src/features/search/use-search.ts | 2 +- src/global-styles.tsx | 2 + src/pages/_app.tsx | 16 +- src/pages/address/[principal].tsx | 4 +- src/pages/block/[hash].tsx | 4 +- src/pages/blocks.tsx | 2 +- src/pages/index.tsx | 2 +- src/pages/microblock/[hash].tsx | 4 +- .../sandbox/contract-call/[[...params]].tsx | 2 +- src/pages/sandbox/deploy.tsx | 6 +- src/pages/sandbox/faucet.tsx | 4 +- src/pages/sandbox/transfer.tsx | 4 +- src/pages/token/[tokenId].tsx | 2 +- src/pages/tokens.tsx | 6 +- src/pages/transactions.tsx | 2 +- src/pages/txid/[txid].tsx | 6 +- src/pages/{_document.tsx => x_document.tsx} | 0 src/ui/CodeEditor/index.tsx | 9 +- src/ui/UIProvider.tsx | 11 +- tsconfig.json | 8 +- 292 files changed, 567 insertions(+), 395 deletions(-) create mode 100644 src/app/init.ts create mode 100644 src/app/test/error.tsx create mode 100644 src/app/test/head.tsx create mode 100644 src/app/test/layout.tsx create mode 100644 src/app/test/loading.tsx create mode 100644 src/app/test/page.tsx rename src/{app => appPages}/DefaultHeadTags.tsx (100%) rename src/{app => appPages}/HomeClient.tsx (97%) rename src/{app => appPages}/PageWrapper.tsx (97%) rename src/{app => appPages}/Providers.tsx (69%) rename src/{app => appPages}/address/[principal]/error.tsx (100%) rename src/{app => appPages}/address/[principal]/head.tsx (100%) rename src/{app => appPages}/address/[principal]/page.tsx (91%) rename src/{app => appPages}/block/[hash]/error.tsx (100%) rename src/{app => appPages}/block/[hash]/head.tsx (100%) rename src/{app => appPages}/block/[hash]/page.tsx (98%) rename src/{app => appPages}/block/[hash]/tx-lists/BlockTxsList.tsx (100%) rename src/{app => appPages}/blocks/head.tsx (100%) rename src/{app => appPages}/blocks/loading.tsx (100%) rename src/{app => appPages}/blocks/page.tsx (83%) rename src/{app => appPages}/common/claritySyntax.ts (100%) rename src/{app => appPages}/common/components/ContractAvailableFunctions.tsx (84%) rename src/{app => appPages}/common/components/CopyButton.tsx (100%) rename src/{app => appPages}/common/components/KeyValueHorizontal.tsx (100%) rename src/{app => appPages}/common/components/KeyValueVertical.tsx (100%) rename src/{app => appPages}/common/components/ListItem.tsx (100%) rename src/{app => appPages}/common/components/PageTitle.tsx (100%) rename src/{app => appPages}/common/components/StxPriceButton/index.tsx (100%) rename src/{app => appPages}/common/components/StxPriceButton/useStxPriceForTx.ts (100%) rename src/{app => appPages}/common/components/TabsContainer.tsx (100%) rename src/{app => appPages}/common/components/TwoColumnPage.tsx (100%) rename src/{app => appPages}/common/components/TxIcon.tsx (100%) rename src/{app => appPages}/common/components/Value.tsx (100%) rename src/{app => appPages}/common/components/__tests__/TabsContainer.test.tsx (100%) rename src/{app => appPages}/common/components/skeletons/SSRSkeletonBlockList.tsx (100%) rename src/{app => appPages}/common/components/skeletons/SSRSkeletonTxList.tsx (100%) rename src/{app => appPages}/common/components/tx-lists/address-lists/AddressConfirmedTxsList.tsx (100%) rename src/{app => appPages}/common/components/tx-lists/address-lists/AddressMempoolTxsList.tsx (100%) rename src/{app => appPages}/common/components/tx-lists/common/components/FilteredTxs.tsx (100%) rename src/{app => appPages}/common/components/tx-lists/common/types/transfers.ts (100%) rename src/{app => appPages}/common/components/tx-lists/common/utils/tx.tsx (97%) rename src/{app => appPages}/common/components/tx-lists/default-lists/ConfirmedTxsList.tsx (100%) rename src/{app => appPages}/common/components/tx-lists/default-lists/MempoolTxsList.tsx (100%) rename src/{app => appPages}/common/components/tx-lists/list-items/FtTransfers.tsx (96%) rename src/{app => appPages}/common/components/tx-lists/list-items/MempoolTxListItem.tsx (97%) rename src/{app => appPages}/common/components/tx-lists/list-items/MempoolTxListItemMini.tsx (96%) rename src/{app => appPages}/common/components/tx-lists/list-items/NftTransfers.tsx (100%) rename src/{app => appPages}/common/components/tx-lists/list-items/StxTransfers.tsx (100%) rename src/{app => appPages}/common/components/tx-lists/list-items/TransferListItem.tsx (97%) rename src/{app => appPages}/common/components/tx-lists/list-items/TxListItem.tsx (98%) rename src/{app => appPages}/common/components/tx-lists/list-items/TxListItemMini.tsx (96%) rename src/{app => appPages}/common/components/tx-lists/list-items/TxWithTransferListItem.tsx (93%) rename src/{app => appPages}/common/components/tx-lists/tabs/AddressTxListTabs.tsx (100%) rename src/{app => appPages}/common/components/tx-lists/tabs/DefaultTxListTabs.tsx (100%) rename src/{app => appPages}/common/components/tx-lists/tabs/TxListTabs.tsx (93%) rename src/{app => appPages}/common/components/tx-lists/tabs/__tests__/TxListTabs.test.tsx (100%) rename src/{app => appPages}/common/components/tx-lists/utils/tx.ts (100%) rename src/{app => appPages}/common/consts/head.ts (100%) rename src/{app => appPages}/common/hooks/use-current-prices.ts (100%) rename src/{app => appPages}/common/hooks/use-debounce.ts (100%) rename src/{app => appPages}/common/hooks/use-filter-state.tsx (100%) rename src/{app => appPages}/common/hooks/use-random-name.tsx (100%) rename src/{app => appPages}/common/hooks/use-stacks-network.ts (100%) rename src/{app => appPages}/common/hooks/useInfiniteQueryResult.ts (100%) rename src/{app => appPages}/common/queries/query-stale-time.ts (100%) rename src/{app => appPages}/common/queries/useAccountBalance.ts (100%) rename src/{app => appPages}/common/queries/useAddressConfirmedTxsWithTransfersInfinite.ts (100%) rename src/{app => appPages}/common/queries/useAddressMempoolTxsInfinite.ts (100%) rename src/{app => appPages}/common/queries/useAddressNonces.ts (100%) rename src/{app => appPages}/common/queries/useBlockByHash.ts (100%) rename src/{app => appPages}/common/queries/useBlockListInfinite.ts (100%) rename src/{app => appPages}/common/queries/useBlockTxsInfinite.ts (100%) rename src/{app => appPages}/common/queries/useConfirmedTransactionsInfinite.ts (100%) rename src/{app => appPages}/common/queries/useContractById.ts (100%) rename src/{app => appPages}/common/queries/useCoreApiInfo.ts (100%) rename src/{app => appPages}/common/queries/useFtMetadata.ts (100%) rename src/{app => appPages}/common/queries/useMempoolTransactionsInfinite.ts (100%) rename src/{app => appPages}/common/queries/useMicroblockByHash.ts (100%) rename src/{app => appPages}/common/queries/useNftHoldings.ts (100%) rename src/{app => appPages}/common/queries/useNftMetadata.ts (100%) rename src/{app => appPages}/common/queries/useTxById.ts (100%) rename src/{app => appPages}/common/server-calls/fetchClaritySyntax.ts (100%) rename src/{app => appPages}/common/styles/border.ts (100%) rename src/{app => appPages}/common/utils/__tests__/validateUrl.test.ts (100%) rename src/{app => appPages}/common/utils/buildUrl.ts (100%) rename src/{app => appPages}/common/utils/head.ts (100%) rename src/{app => appPages}/common/utils/sandbox.ts (100%) rename src/{app => appPages}/common/utils/validateUrl.ts (100%) rename src/{app => appPages}/components/BlockList/AnimatedBlockAndMicroblocksItem.tsx (94%) rename src/{app => appPages}/components/BlockList/BlockAndMicroblocksItem.tsx (95%) rename src/{app => appPages}/components/BlockList/BlockListItem.tsx (100%) rename src/{app => appPages}/components/BlockList/MicroblockListItem.tsx (100%) rename src/{app => appPages}/components/BlockList/__tests__/BlocksListBase.test.tsx (97%) rename src/{app => appPages}/components/BlockList/__tests__/MicroblockListItem.test.tsx (100%) rename src/{app => appPages}/components/BlockList/__tests__/__snapshots__/MicroblockListItem.test.tsx.snap (100%) rename src/{app => appPages}/components/BlockList/hooks/useBlockList.ts (100%) rename src/{app => appPages}/components/BlockList/index.tsx (93%) rename src/{app => appPages}/components/BlockList/types.ts (100%) rename src/{app => appPages}/components/NavBar/DesktopNav.tsx (100%) rename src/{app => appPages}/components/NavBar/DesktopSubNav.tsx (100%) rename src/{app => appPages}/components/NavBar/Logo.tsx (100%) rename src/{app => appPages}/components/NavBar/MobileNav.tsx (94%) rename src/{app => appPages}/components/NavBar/MobileNavItem.tsx (100%) rename src/{app => appPages}/components/NavBar/NavLabel.tsx (100%) rename src/{app => appPages}/components/NavBar/NetworkLabel.tsx (94%) rename src/{app => appPages}/components/NavBar/__tests__/DesktopNav.test.tsx (100%) rename src/{app => appPages}/components/NavBar/__tests__/MobileNav.test.tsx (100%) rename src/{app => appPages}/components/NavBar/__tests__/NetworkLabel.test.tsx (100%) rename src/{app => appPages}/components/NavBar/__tests__/__snapshots__/DesktopNav.test.tsx.snap (100%) rename src/{app => appPages}/components/NavBar/__tests__/__snapshots__/MobileNav.test.tsx.snap (100%) rename src/{app => appPages}/components/NavBar/getCustomNetworkApiInfo.ts (100%) rename src/{app => appPages}/components/NavBar/index.tsx (90%) rename src/{app => appPages}/components/NavBar/types.ts (100%) rename src/{app => appPages}/error.tsx (100%) rename src/{app => appPages}/head.tsx (100%) create mode 100644 src/appPages/layout.tsx rename src/{app => appPages}/loading.tsx (100%) rename src/{app => appPages}/microblock/[hash]/error.tsx (100%) rename src/{app => appPages}/microblock/[hash]/head.tsx (100%) rename src/{app => appPages}/microblock/[hash]/page.tsx (96%) rename src/{app => appPages}/microblock/[hash]/tx-lists/MicroblockTxsList.tsx (92%) rename src/{app => appPages}/page.tsx (83%) rename src/{app => appPages}/sandbox/components/Argument/ListArgumentInput.tsx (100%) rename src/{app => appPages}/sandbox/components/Argument/PrimitiveArgumentInput.tsx (100%) rename src/{app => appPages}/sandbox/components/Argument/TupleArgumentInput.tsx (100%) rename src/{app => appPages}/sandbox/components/Argument/index.tsx (100%) rename src/{app => appPages}/sandbox/components/Argument/types.ts (100%) rename src/{app => appPages}/sandbox/components/ClarityIcon.tsx (100%) rename src/{app => appPages}/sandbox/components/ContractCall/AvailableFunctionsView.tsx (97%) rename src/{app => appPages}/sandbox/components/ContractCall/DefaultView/PopularContracts.tsx (100%) rename src/{app => appPages}/sandbox/components/ContractCall/DefaultView/SearchContractsForm.tsx (98%) rename src/{app => appPages}/sandbox/components/ContractCall/DefaultView/index.tsx (100%) rename src/{app => appPages}/sandbox/components/ContractCall/FunctionView.tsx (99%) rename src/{app => appPages}/sandbox/components/ContractCall/ReadOnlyField.tsx (100%) rename src/{app => appPages}/sandbox/components/ContractCall/SelectedContractView.tsx (98%) rename src/{app => appPages}/sandbox/components/Toolbar.tsx (100%) rename src/{app => appPages}/sandbox/components/TransactionsPanel.tsx (99%) rename src/{app => appPages}/sandbox/contract-call/[[...params]]/page.tsx (100%) rename src/{app => appPages}/sandbox/deploy/DeployPage.tsx (100%) rename src/{app => appPages}/sandbox/deploy/LeftSection.tsx (100%) rename src/{app => appPages}/sandbox/deploy/RightSection.tsx (100%) rename src/{app => appPages}/sandbox/deploy/page.tsx (100%) rename src/{app => appPages}/sandbox/editor-config/autocomplete.ts (100%) rename src/{app => appPages}/sandbox/editor-config/clarity-reference.ts (100%) rename src/{app => appPages}/sandbox/editor-config/define-theme.ts (100%) rename src/{app => appPages}/sandbox/editor-config/init.ts (100%) rename src/{app => appPages}/sandbox/editor-config/language.ts (100%) rename src/{app => appPages}/sandbox/faucet/page.tsx (100%) rename src/{app => appPages}/sandbox/head.tsx (100%) rename src/{app => appPages}/sandbox/hooks/useUser.ts (100%) rename src/{app => appPages}/sandbox/layout.tsx (95%) rename src/{app => appPages}/sandbox/layout/ConnectToStacks.tsx (100%) rename src/{app => appPages}/sandbox/layout/Header.tsx (100%) rename src/{app => appPages}/sandbox/layout/NavItem.tsx (100%) rename src/{app => appPages}/sandbox/layout/RightPanel.tsx (97%) rename src/{app => appPages}/sandbox/layout/SideNav.tsx (96%) rename src/{app => appPages}/sandbox/layout/SkeletonRightPanel.tsx (96%) rename src/{app => appPages}/sandbox/sandbox-slice.ts (100%) rename src/{app => appPages}/sandbox/transfer/page.tsx (100%) rename src/{app => appPages}/sandbox/types/values.ts (100%) rename src/{app => appPages}/sandbox/utils.ts (100%) rename src/{app => appPages}/stats/CurrentStackingCycle/index.tsx (95%) rename src/{app => appPages}/stats/CurrentStackingCycle/useCurrentStackingCycle.ts (100%) rename src/{app => appPages}/stats/LastBlock/index.tsx (100%) rename src/{app => appPages}/stats/NextStackingCycle/index.tsx (97%) rename src/{app => appPages}/stats/NextStackingCycle/useNextStackingCycle.ts (100%) rename src/{app => appPages}/stats/SkeletonStatSection.tsx (100%) rename src/{app => appPages}/stats/StackingCycle.tsx (100%) rename src/{app => appPages}/stats/StatSection.tsx (100%) rename src/{app => appPages}/stats/Stats.tsx (100%) rename src/{app => appPages}/stats/StxSupply/index.tsx (100%) rename src/{app => appPages}/stats/StxSupply/useStxSupply.ts (100%) rename src/{app => appPages}/token/[tokenId]/LinksGroup.tsx (90%) rename src/{app => appPages}/token/[tokenId]/LinksMenu.tsx (96%) rename src/{app => appPages}/token/[tokenId]/Tabs/DeveloperStat.tsx (100%) rename src/{app => appPages}/token/[tokenId]/Tabs/Developers.tsx (100%) rename src/{app => appPages}/token/[tokenId]/Tabs/index.tsx (72%) rename src/{app => appPages}/token/[tokenId]/TokenInfo/MarketCap.tsx (88%) rename src/{app => appPages}/token/[tokenId]/TokenInfo/Price.tsx (90%) rename src/{app => appPages}/token/[tokenId]/TokenInfo/Supply.tsx (92%) rename src/{app => appPages}/token/[tokenId]/TokenInfo/Transaction.tsx (94%) rename src/{app => appPages}/token/[tokenId]/TokenInfo/TrendArrow.tsx (100%) rename src/{app => appPages}/token/[tokenId]/TokenInfo/index.tsx (100%) rename src/{app => appPages}/token/[tokenId]/__tests__/utils.test.ts (100%) rename src/{app => appPages}/token/[tokenId]/error.tsx (93%) rename src/{app => appPages}/token/[tokenId]/head.tsx (100%) rename src/{app => appPages}/token/[tokenId]/index.tsx (93%) rename src/{app => appPages}/token/[tokenId]/page.tsx (96%) rename src/{app => appPages}/token/[tokenId]/utils.ts (100%) rename src/{app => appPages}/tokens/TokenRow/index.tsx (100%) rename src/{app => appPages}/tokens/TokenRow/loading.tsx (100%) rename src/{app => appPages}/tokens/TokensList/TokensList.tsx (96%) rename src/{app => appPages}/tokens/TokensList/index.tsx (100%) rename src/{app => appPages}/tokens/TokensList/loading.tsx (100%) rename src/{app => appPages}/tokens/__tests__/TokenRow.test.tsx (100%) rename src/{app => appPages}/tokens/__tests__/__snapshots__/TokenRow.test.tsx.snap (100%) rename src/{app => appPages}/tokens/__tests__/useTokens.test.tsx (93%) rename src/{app => appPages}/tokens/head.tsx (100%) rename src/{app => appPages}/tokens/page.tsx (60%) rename src/{app => appPages}/tokens/useFtTokens.ts (92%) rename src/{app => appPages}/tokens/useTokens.ts (93%) rename src/{app => appPages}/transactions/head.tsx (100%) rename src/{app => appPages}/transactions/loading.tsx (95%) rename src/{app => appPages}/transactions/page.tsx (86%) rename src/{app => appPages}/txid/TransactionPageComponent.tsx (94%) rename src/{app => appPages}/txid/[txid]/Cards/BtcAnchorBlockCard.tsx (100%) rename src/{app => appPages}/txid/[txid]/Cards/ContractDetailsCard.tsx (100%) rename src/{app => appPages}/txid/[txid]/CoinbasePage/TxDetails.tsx (100%) rename src/{app => appPages}/txid/[txid]/CoinbasePage/index.tsx (100%) rename src/{app => appPages}/txid/[txid]/ContractCall/TxDetails.tsx (100%) rename src/{app => appPages}/txid/[txid]/ContractCall/index.tsx (95%) rename src/{app => appPages}/txid/[txid]/PoisonMicroblock/TxDetails.tsx (100%) rename src/{app => appPages}/txid/[txid]/PoisonMicroblock/index.tsx (100%) rename src/{app => appPages}/txid/[txid]/SmartContractPage/ContractTabs.tsx (85%) rename src/{app => appPages}/txid/[txid]/SmartContractPage/TxDetails.tsx (100%) rename src/{app => appPages}/txid/[txid]/SmartContractPage/index.tsx (100%) rename src/{app => appPages}/txid/[txid]/TokenTransfer/TxDetails.tsx (100%) rename src/{app => appPages}/txid/[txid]/TokenTransfer/index.tsx (100%) rename src/{app => appPages}/txid/[txid]/TxDetails/Amount.tsx (100%) rename src/{app => appPages}/txid/[txid]/TxDetails/BlockHash.tsx (100%) rename src/{app => appPages}/txid/[txid]/TxDetails/BlockHeight.tsx (100%) rename src/{app => appPages}/txid/[txid]/TxDetails/Broadcast.tsx (100%) rename src/{app => appPages}/txid/[txid]/TxDetails/ClarityVersion.tsx (100%) rename src/{app => appPages}/txid/[txid]/TxDetails/ContractName.tsx (100%) rename src/{app => appPages}/txid/[txid]/TxDetails/Fees.tsx (100%) rename src/{app => appPages}/txid/[txid]/TxDetails/ID.tsx (100%) rename src/{app => appPages}/txid/[txid]/TxDetails/Memo.tsx (100%) rename src/{app => appPages}/txid/[txid]/TxDetails/NonCanonical.tsx (100%) rename src/{app => appPages}/txid/[txid]/TxDetails/Nonce.tsx (100%) rename src/{app => appPages}/txid/[txid]/TxDetails/Recipient.tsx (100%) rename src/{app => appPages}/txid/[txid]/TxDetails/Sender.tsx (100%) rename src/{app => appPages}/txid/[txid]/TxDetails/__tests__/Broadcast.test.tsx (100%) rename src/{app => appPages}/txid/[txid]/TxDetails/__tests__/__snapshots__/Broadcast.test.tsx.snap (100%) rename src/{app => appPages}/txid/[txid]/TxPage.tsx (100%) rename src/{app => appPages}/txid/[txid]/error.tsx (93%) rename src/{app => appPages}/txid/[txid]/head.tsx (100%) rename src/{app => appPages}/txid/[txid]/page.tsx (83%) rename src/{app => appPages}/txid/[txid]/utils.ts (100%) rename src/pages/{_document.tsx => x_document.tsx} (100%) diff --git a/Dockerfile b/Dockerfile index a811f86d6..353c71d79 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:16-alpine AS build +FROM node:18-alpine AS build ARG REDIS_URL ARG SEGMENT_WRITE_KEY @@ -17,7 +17,7 @@ RUN npm install -g pnpm@8.9.1 RUN pnpm i RUN pnpm build -FROM node:16-alpine +FROM node:18-alpine ARG REDIS_URL ARG SEGMENT_WRITE_KEY diff --git a/next-env.d.ts b/next-env.d.ts index 4f11a03dc..fd36f9494 100644 --- a/next-env.d.ts +++ b/next-env.d.ts @@ -1,5 +1,6 @@ /// /// +/// // NOTE: This file should not be edited // see https://nextjs.org/docs/basic-features/typescript for more information. diff --git a/package.json b/package.json index 492642073..8210eaea0 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "author": "Hiro Systems PBC (formerly Blockstack PBC)", "dependencies": { "@chakra-ui/anatomy": "2.2.0", + "@chakra-ui/next-js": "^2.2.0", "@chakra-ui/react": "2.8.0", "@chakra-ui/theme-tools": "2.1.0", "@emotion/cache": "11.11.0", @@ -79,7 +80,7 @@ "monaco-vscode-textmate-theme-converter": "0.1.7", "monacode": "0.3.1", "morgan": "1.10.0", - "next": "13.1.6", + "next": "14.0.2", "next-plugin-preact": "3.0.6", "nookies": "2.5.2", "onigasm": "2.2.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a2b3dc40c..50ea09868 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,6 +11,9 @@ dependencies: '@chakra-ui/anatomy': specifier: 2.2.0 version: 2.2.0 + '@chakra-ui/next-js': + specifier: ^2.2.0 + version: 2.2.0(@chakra-ui/react@2.8.0)(@emotion/react@11.11.1)(next@14.0.2)(react@18.2.0) '@chakra-ui/react': specifier: 2.8.0 version: 2.8.0(@emotion/react@11.11.1)(@emotion/styled@11.11.0)(@types/react@17.0.15)(framer-motion@10.16.4)(react-dom@18.2.0)(react@18.2.0) @@ -67,7 +70,7 @@ dependencies: version: 4.16.2 '@sentry/nextjs': specifier: 7.67.0 - version: 7.67.0(next@13.1.6)(react@18.2.0)(webpack@5.88.2) + version: 7.67.0(next@14.0.2)(react@18.2.0)(webpack@5.88.2) '@stacks/auth': specifier: 6.9.0 version: 6.9.0 @@ -174,11 +177,11 @@ dependencies: specifier: 1.10.0 version: 1.10.0 next: - specifier: 13.1.6 - version: 13.1.6(@babel/core@7.20.12)(react-dom@18.2.0)(react@18.2.0) + specifier: 14.0.2 + version: 14.0.2(@babel/core@7.20.12)(react-dom@18.2.0)(react@18.2.0) next-plugin-preact: specifier: 3.0.6 - version: 3.0.6(@prefresh/babel-plugin@0.4.4)(next@13.1.6)(preact-render-to-string@5.1.19)(preact-ssr-prepass@1.2.0)(preact@10.18.1)(webpack@5.88.2) + version: 3.0.6(@prefresh/babel-plugin@0.4.4)(next@14.0.2)(preact-render-to-string@5.1.19)(preact-ssr-prepass@1.2.0)(preact@10.18.1)(webpack@5.88.2) nookies: specifier: 2.5.2 version: 2.5.2 @@ -417,7 +420,7 @@ devDependencies: version: 11.0.0 next-router-mock: specifier: 0.9.7 - version: 0.9.7(next@13.1.6)(react@18.2.0) + version: 0.9.7(next@14.0.2)(react@18.2.0) package-json-cleanup-loader: specifier: 1.0.3 version: 1.0.3 @@ -2413,6 +2416,21 @@ packages: - '@types/react' dev: false + /@chakra-ui/next-js@2.2.0(@chakra-ui/react@2.8.0)(@emotion/react@11.11.1)(next@14.0.2)(react@18.2.0): + resolution: {integrity: sha512-brCz0UEOlImX4Np2jDIaljZJkW6kiDSuXG5erxvYjZlklLhmti1zj0o1sSjt5yff1xndfgHoOJb+BYG5wx+vDg==} + peerDependencies: + '@chakra-ui/react': '>=2.4.0' + '@emotion/react': '>=11' + next: '>=13' + react: '>=18' + dependencies: + '@chakra-ui/react': 2.8.0(@emotion/react@11.11.1)(@emotion/styled@11.11.0)(@types/react@17.0.15)(framer-motion@10.16.4)(react-dom@18.2.0)(react@18.2.0) + '@emotion/cache': 11.11.0 + '@emotion/react': 11.11.1(@types/react@17.0.15)(react@18.2.0) + next: 14.0.2(@babel/core@7.20.12)(react-dom@18.2.0)(react@18.2.0) + react: 18.2.0 + dev: false + /@chakra-ui/number-input@2.1.0(@chakra-ui/system@2.6.0)(react@18.2.0): resolution: {integrity: sha512-/gEAzQHhrMA+1rzyCMaN8OkKtUPuER6iA+nloYEYBoT7dH/EoNlRtBkiIQhDp+E4VpgZJ0SK3OVrm9/eBbtHHg==} peerDependencies: @@ -3533,13 +3551,13 @@ packages: resolution: {integrity: sha512-k2mTh0m+IV1HRdU0xXM617tSQTi53tVR2muvYOsBeYcUgEAyxV1FOC7Qj279th3fBVQ+Dj6muvNJZcHSPNdbKg==} dependencies: '@formatjs/intl-localematcher': 0.4.2 - tslib: 2.4.1 + tslib: 2.6.2 dev: false /@formatjs/fast-memoize@2.2.0: resolution: {integrity: sha512-hnk/nY8FyrL5YxwP9e4r9dqeM6cAbo8PeU9UjyXojZMNvVad2Z06FAVHyR3Ecw6fza+0GH7vdJgiKIVXTMbSBA==} dependencies: - tslib: 2.4.1 + tslib: 2.6.2 dev: false /@formatjs/icu-messageformat-parser@2.6.2: @@ -3547,20 +3565,20 @@ packages: dependencies: '@formatjs/ecma402-abstract': 1.17.2 '@formatjs/icu-skeleton-parser': 1.6.2 - tslib: 2.4.1 + tslib: 2.6.2 dev: false /@formatjs/icu-skeleton-parser@1.6.2: resolution: {integrity: sha512-VtB9Slo4ZL6QgtDFJ8Injvscf0xiDd4bIV93SOJTBjUF4xe2nAWOoSjLEtqIG+hlIs1sNrVKAaFo3nuTI4r5ZA==} dependencies: '@formatjs/ecma402-abstract': 1.17.2 - tslib: 2.4.1 + tslib: 2.6.2 dev: false /@formatjs/intl-localematcher@0.4.2: resolution: {integrity: sha512-BGdtJFmaNJy5An/Zan4OId/yR9Ih1OojFjcduX/xOvq798OgWSyDtd6Qd5jqJXwJs1ipe4Fxu9+cshic5Ox2tA==} dependencies: - tslib: 2.4.1 + tslib: 2.6.2 dev: false /@gar/promisify@1.1.3: @@ -4065,8 +4083,8 @@ packages: - utf-8-validate dev: true - /@next/env@13.1.6: - resolution: {integrity: sha512-s+W9Fdqh5MFk6ECrbnVmmAOwxKQuhGMT7xXHrkYIBMBcTiOqNWhv5KbJIboKR5STXxNXl32hllnvKaffzFaWQg==} + /@next/env@14.0.2: + resolution: {integrity: sha512-HAW1sljizEaduEOes/m84oUqeIDAUYBR1CDwu2tobNlNDFP3cSm9d6QsOsGeNlIppU1p/p1+bWbYCbvwjFiceA==} /@next/eslint-plugin-next@13.1.1: resolution: {integrity: sha512-SBrOFS8PC3nQ5aeZmawJkjKkWjwK9RoxvBSv/86nZp0ubdoVQoko8r8htALd9ufp16NhacCdqhu9bzZLDWtALQ==} @@ -4074,104 +4092,72 @@ packages: glob: 7.1.7 dev: true - /@next/swc-android-arm-eabi@13.1.6: - resolution: {integrity: sha512-F3/6Z8LH/pGlPzR1AcjPFxx35mPqjE5xZcf+IL+KgbW9tMkp7CYi1y7qKrEWU7W4AumxX/8OINnDQWLiwLasLQ==} - engines: {node: '>= 10'} - cpu: [arm] - os: [android] - requiresBuild: true - optional: true - - /@next/swc-android-arm64@13.1.6: - resolution: {integrity: sha512-cMwQjnB8vrYkWyK/H0Rf2c2pKIH4RGjpKUDvbjVAit6SbwPDpmaijLio0LWFV3/tOnY6kvzbL62lndVA0mkYpw==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [android] - requiresBuild: true - optional: true - - /@next/swc-darwin-arm64@13.1.6: - resolution: {integrity: sha512-KKRQH4DDE4kONXCvFMNBZGDb499Hs+xcFAwvj+rfSUssIDrZOlyfJNy55rH5t2Qxed1e4K80KEJgsxKQN1/fyw==} + /@next/swc-darwin-arm64@14.0.2: + resolution: {integrity: sha512-i+jQY0fOb8L5gvGvojWyZMfQoQtDVB2kYe7fufOEiST6sicvzI2W5/EXo4lX5bLUjapHKe+nFxuVv7BA+Pd7LQ==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] requiresBuild: true optional: true - /@next/swc-darwin-x64@13.1.6: - resolution: {integrity: sha512-/uOky5PaZDoaU99ohjtNcDTJ6ks/gZ5ykTQDvNZDjIoCxFe3+t06bxsTPY6tAO6uEAw5f6vVFX5H5KLwhrkZCA==} + /@next/swc-darwin-x64@14.0.2: + resolution: {integrity: sha512-zRCAO0d2hW6gBEa4wJaLn+gY8qtIqD3gYd9NjruuN98OCI6YyelmhWVVLlREjS7RYrm9OUQIp/iVJFeB6kP1hg==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] requiresBuild: true optional: true - /@next/swc-freebsd-x64@13.1.6: - resolution: {integrity: sha512-qaEALZeV7to6weSXk3Br80wtFQ7cFTpos/q+m9XVRFggu+8Ib895XhMWdJBzew6aaOcMvYR6KQ6JmHA2/eMzWw==} - engines: {node: '>= 10'} - cpu: [x64] - os: [freebsd] - requiresBuild: true - optional: true - - /@next/swc-linux-arm-gnueabihf@13.1.6: - resolution: {integrity: sha512-OybkbC58A1wJ+JrJSOjGDvZzrVEQA4sprJejGqMwiZyLqhr9Eo8FXF0y6HL+m1CPCpPhXEHz/2xKoYsl16kNqw==} - engines: {node: '>= 10'} - cpu: [arm] - os: [linux] - requiresBuild: true - optional: true - - /@next/swc-linux-arm64-gnu@13.1.6: - resolution: {integrity: sha512-yCH+yDr7/4FDuWv6+GiYrPI9kcTAO3y48UmaIbrKy8ZJpi7RehJe3vIBRUmLrLaNDH3rY1rwoHi471NvR5J5NQ==} + /@next/swc-linux-arm64-gnu@14.0.2: + resolution: {integrity: sha512-tSJmiaon8YaKsVhi7GgRizZoV0N1Sx5+i+hFTrCKKQN7s3tuqW0Rov+RYdPhAv/pJl4qiG+XfSX4eJXqpNg3dA==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] requiresBuild: true optional: true - /@next/swc-linux-arm64-musl@13.1.6: - resolution: {integrity: sha512-ECagB8LGX25P9Mrmlc7Q/TQBb9rGScxHbv/kLqqIWs2fIXy6Y/EiBBiM72NTwuXUFCNrWR4sjUPSooVBJJ3ESQ==} + /@next/swc-linux-arm64-musl@14.0.2: + resolution: {integrity: sha512-dXJLMSEOwqJKcag1BeX1C+ekdPPJ9yXbWIt3nAadhbLx5CjACoB2NQj9Xcqu2tmdr5L6m34fR+fjGPs+ZVPLzA==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] requiresBuild: true optional: true - /@next/swc-linux-x64-gnu@13.1.6: - resolution: {integrity: sha512-GT5w2mruk90V/I5g6ScuueE7fqj/d8Bui2qxdw6lFxmuTgMeol5rnzAv4uAoVQgClOUO/MULilzlODg9Ib3Y4Q==} + /@next/swc-linux-x64-gnu@14.0.2: + resolution: {integrity: sha512-WC9KAPSowj6as76P3vf1J3mf2QTm3Wv3FBzQi7UJ+dxWjK3MhHVWsWUo24AnmHx9qDcEtHM58okgZkXVqeLB+Q==} engines: {node: '>= 10'} cpu: [x64] os: [linux] requiresBuild: true optional: true - /@next/swc-linux-x64-musl@13.1.6: - resolution: {integrity: sha512-keFD6KvwOPzmat4TCnlnuxJCQepPN+8j3Nw876FtULxo8005Y9Ghcl7ACcR8GoiKoddAq8gxNBrpjoxjQRHeAQ==} + /@next/swc-linux-x64-musl@14.0.2: + resolution: {integrity: sha512-KSSAwvUcjtdZY4zJFa2f5VNJIwuEVnOSlqYqbQIawREJA+gUI6egeiRu290pXioQXnQHYYdXmnVNZ4M+VMB7KQ==} engines: {node: '>= 10'} cpu: [x64] os: [linux] requiresBuild: true optional: true - /@next/swc-win32-arm64-msvc@13.1.6: - resolution: {integrity: sha512-OwertslIiGQluFvHyRDzBCIB07qJjqabAmINlXUYt7/sY7Q7QPE8xVi5beBxX/rxTGPIbtyIe3faBE6Z2KywhQ==} + /@next/swc-win32-arm64-msvc@14.0.2: + resolution: {integrity: sha512-2/O0F1SqJ0bD3zqNuYge0ok7OEWCQwk55RPheDYD0va5ij7kYwrFkq5ycCRN0TLjLfxSF6xI5NM6nC5ux7svEQ==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] requiresBuild: true optional: true - /@next/swc-win32-ia32-msvc@13.1.6: - resolution: {integrity: sha512-g8zowiuP8FxUR9zslPmlju7qYbs2XBtTLVSxVikPtUDQedhcls39uKYLvOOd1JZg0ehyhopobRoH1q+MHlIN/w==} + /@next/swc-win32-ia32-msvc@14.0.2: + resolution: {integrity: sha512-vJI/x70Id0oN4Bq/R6byBqV1/NS5Dl31zC+lowO8SDu1fHmUxoAdILZR5X/sKbiJpuvKcCrwbYgJU8FF/Gh50Q==} engines: {node: '>= 10'} cpu: [ia32] os: [win32] requiresBuild: true optional: true - /@next/swc-win32-x64-msvc@13.1.6: - resolution: {integrity: sha512-Ls2OL9hi3YlJKGNdKv8k3X/lLgc3VmLG3a/DeTkAd+lAituJp8ZHmRmm9f9SL84fT3CotlzcgbdaCDfFwFA6bA==} + /@next/swc-win32-x64-msvc@14.0.2: + resolution: {integrity: sha512-Ut4LXIUvC5m8pHTe2j0vq/YDnTEyq6RSR9vHYPqnELrDapPhLNz9Od/L5Ow3J8RNDWpEnfCiQXuVdfjlNEJ7ug==} engines: {node: '>= 10'} cpu: [x64] os: [win32] @@ -4245,7 +4231,7 @@ packages: open: 8.4.0 picocolors: 1.0.0 tiny-glob: 0.2.9 - tslib: 2.4.1 + tslib: 2.6.2 dev: true /@playwright/test@1.22.2: @@ -4319,7 +4305,7 @@ packages: preact: 10.18.1 dev: false - /@prefresh/next@1.4.7(next@13.1.6)(preact@10.18.1)(webpack@5.88.2): + /@prefresh/next@1.4.7(next@14.0.2)(preact@10.18.1)(webpack@5.88.2): resolution: {integrity: sha512-Dz0ssNDk6suG4Sag31uG6sMCFckipf6WZjQ+Wd4uTaNlcmzGQZpIOfbqyYrK6hP3kuG2lSQ0DgtGFj32Ze4dHw==} peerDependencies: next: ^9.4.0 || ^10.0.0 || ^11.0.0 @@ -4330,7 +4316,7 @@ packages: '@prefresh/core': 1.3.2(preact@10.18.1) '@prefresh/utils': 1.1.1 '@prefresh/webpack': 3.3.2(@prefresh/babel-plugin@0.4.1)(preact@10.18.1)(webpack@5.88.2) - next: 13.1.6(@babel/core@7.20.12)(react-dom@18.2.0)(react@18.2.0) + next: 14.0.2(@babel/core@7.20.12)(react-dom@18.2.0)(react@18.2.0) preact: 10.18.1 webpack: 5.88.2 dev: false @@ -5808,7 +5794,7 @@ packages: '@sentry/core': 7.67.0 '@sentry/types': 7.67.0 '@sentry/utils': 7.67.0 - tslib: 2.4.1 + tslib: 2.6.2 dev: false /@sentry/browser@7.67.0: @@ -5820,7 +5806,7 @@ packages: '@sentry/replay': 7.67.0 '@sentry/types': 7.67.0 '@sentry/utils': 7.67.0 - tslib: 2.4.1 + tslib: 2.6.2 dev: false /@sentry/cli@1.75.0: @@ -5846,7 +5832,7 @@ packages: dependencies: '@sentry/types': 7.67.0 '@sentry/utils': 7.67.0 - tslib: 2.4.1 + tslib: 2.6.2 dev: false /@sentry/integrations@7.67.0: @@ -5856,10 +5842,10 @@ packages: '@sentry/types': 7.67.0 '@sentry/utils': 7.67.0 localforage: 1.10.0 - tslib: 2.4.1 + tslib: 2.6.2 dev: false - /@sentry/nextjs@7.67.0(next@13.1.6)(react@18.2.0)(webpack@5.88.2): + /@sentry/nextjs@7.67.0(next@14.0.2)(react@18.2.0)(webpack@5.88.2): resolution: {integrity: sha512-Iw6jktvb8NYDE+MvBONTTkVBSL/9/skg68ccG1Cs9Sla+0KTlu1+D8fMtmxvn1G50kFo9AONnDb01NhoVa9SjA==} engines: {node: '>=8'} peerDependencies: @@ -5879,7 +5865,7 @@ packages: '@sentry/utils': 7.67.0 '@sentry/webpack-plugin': 1.20.0 chalk: 3.0.0 - next: 13.1.6(@babel/core@7.20.12)(react-dom@18.2.0)(react@18.2.0) + next: 14.0.2(@babel/core@7.20.12)(react-dom@18.2.0)(react@18.2.0) react: 18.2.0 rollup: 2.78.0 stacktrace-parser: 0.1.10 @@ -5901,7 +5887,7 @@ packages: cookie: 0.4.2 https-proxy-agent: 5.0.1 lru_map: 0.3.3 - tslib: 2.4.1 + tslib: 2.6.2 transitivePeerDependencies: - supports-color dev: false @@ -5917,7 +5903,7 @@ packages: '@sentry/utils': 7.67.0 hoist-non-react-statics: 3.3.2 react: 18.2.0 - tslib: 2.4.1 + tslib: 2.6.2 dev: false /@sentry/replay@7.67.0: @@ -5939,7 +5925,7 @@ packages: engines: {node: '>=8'} dependencies: '@sentry/types': 7.67.0 - tslib: 2.4.1 + tslib: 2.6.2 dev: false /@sentry/webpack-plugin@1.20.0: @@ -7333,7 +7319,7 @@ packages: flat-cache: 3.0.4 micromatch: 4.0.5 react-docgen-typescript: 2.2.2(typescript@4.8.4) - tslib: 2.4.1 + tslib: 2.6.2 typescript: 4.8.4 webpack: 5.88.2 transitivePeerDependencies: @@ -7512,7 +7498,7 @@ packages: fs-extra: 9.1.0 global: 4.4.0 isomorphic-unfetch: 3.1.0 - nanoid: 3.3.4 + nanoid: 3.3.6 read-pkg-up: 7.0.1 regenerator-runtime: 0.13.11 transitivePeerDependencies: @@ -7581,13 +7567,13 @@ packages: /@swc/helpers@0.4.14: resolution: {integrity: sha512-4C7nX/dvpzB7za4Ql9K81xK3HPxCpHMgwTZVyf+9JQ6VUbn9jjZVN7/Nkdz/Ugzs2CSjqnL/UPXroiVBVHUWUw==} dependencies: - tslib: 2.4.1 + tslib: 2.6.2 + dev: false /@swc/helpers@0.5.2: resolution: {integrity: sha512-E4KcWTpoLHqwPHLxidpOqQbcrZVgi0rsmmZXUle1jXmJfuIf/UWpczUJ7MZZ5tlxytgJXyp0w4PGkkeLiuIdZw==} dependencies: - tslib: 2.4.1 - dev: false + tslib: 2.6.2 /@tanstack/query-core@4.33.0: resolution: {integrity: sha512-qYu73ptvnzRh6se2nyBIDHGBQvPY1XXl3yR769B7B6mIDD7s+EZhdlWHQ67JI6UOTFRaI7wupnTnwJ3gE0Mr/g==} @@ -9116,7 +9102,7 @@ packages: dependencies: '@types/react': 17.0.15 react: 18.2.0 - tslib: 2.4.1 + tslib: 2.6.2 dev: false /aria-query@4.2.2: @@ -9285,7 +9271,7 @@ packages: resolution: {integrity: sha512-O0yuUDnZeQDL+ncNGlJ78BiO4jnYI3bvMsD5prT0/nsgijG/LpNBIr63gTjVTNsiGkgQhiyCShTgxt8oXOrklA==} engines: {node: '>=4'} dependencies: - tslib: 2.4.1 + tslib: 2.6.2 dev: true /astral-regex@2.0.0: @@ -9875,6 +9861,12 @@ packages: resolution: {integrity: sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ==} dev: true + /busboy@1.6.0: + resolution: {integrity: sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==} + engines: {node: '>=10.16.0'} + dependencies: + streamsearch: 1.1.0 + /bytes@3.0.0: resolution: {integrity: sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==} engines: {node: '>= 0.8'} @@ -9989,7 +9981,7 @@ packages: resolution: {integrity: sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==} dependencies: pascal-case: 3.1.2 - tslib: 2.4.1 + tslib: 2.6.2 dev: true /camelcase-css@2.0.1: @@ -10677,13 +10669,13 @@ packages: peerDependencies: webpack: ^4.27.0 || ^5.0.0 dependencies: - icss-utils: 5.1.0(postcss@8.4.21) + icss-utils: 5.1.0(postcss@8.4.31) loader-utils: 2.0.4 - postcss: 8.4.21 - postcss-modules-extract-imports: 3.0.0(postcss@8.4.21) - postcss-modules-local-by-default: 4.0.0(postcss@8.4.21) - postcss-modules-scope: 3.0.0(postcss@8.4.21) - postcss-modules-values: 4.0.0(postcss@8.4.21) + postcss: 8.4.31 + postcss-modules-extract-imports: 3.0.0(postcss@8.4.31) + postcss-modules-local-by-default: 4.0.0(postcss@8.4.31) + postcss-modules-scope: 3.0.0(postcss@8.4.31) + postcss-modules-values: 4.0.0(postcss@8.4.31) postcss-value-parser: 4.2.0 schema-utils: 3.3.0 semver: 7.5.4 @@ -11086,7 +11078,7 @@ packages: resolution: {integrity: sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==} dependencies: no-case: 3.0.4 - tslib: 2.4.1 + tslib: 2.6.2 dev: true /dot-prop@5.3.0: @@ -12205,7 +12197,7 @@ packages: resolution: {integrity: sha512-KSuV3ur4gf2KqMNoZx3nXNVhqCkn42GuTYCX4tXPEwf0MjpFQmNMiN6m7dXaUXgIoivL6/65agoUMg4RLS0Vbg==} engines: {node: '>=10'} dependencies: - tslib: 2.4.1 + tslib: 2.6.2 dev: false /focus-lock@0.8.1: @@ -13177,13 +13169,13 @@ packages: postcss: 7.0.39 dev: true - /icss-utils@5.1.0(postcss@8.4.21): + /icss-utils@5.1.0(postcss@8.4.31): resolution: {integrity: sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==} engines: {node: ^10 || ^12 || >= 14} peerDependencies: postcss: ^8.1.0 dependencies: - postcss: 8.4.21 + postcss: 8.4.31 dev: true /ieee754@1.2.1: @@ -13305,7 +13297,7 @@ packages: '@formatjs/ecma402-abstract': 1.17.2 '@formatjs/fast-memoize': 2.2.0 '@formatjs/icu-messageformat-parser': 2.6.2 - tslib: 2.4.1 + tslib: 2.6.2 dev: false /invariant@2.2.4: @@ -14870,7 +14862,7 @@ packages: /lower-case@2.0.2: resolution: {integrity: sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==} dependencies: - tslib: 2.4.1 + tslib: 2.6.2 dev: true /lru-cache@5.1.1: @@ -15409,15 +15401,10 @@ packages: dev: true optional: true - /nanoid@3.3.4: - resolution: {integrity: sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==} - engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} - /nanoid@3.3.6: resolution: {integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true - dev: true /nanomatch@1.2.13: resolution: {integrity: sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==} @@ -15458,7 +15445,7 @@ packages: resolution: {integrity: sha512-9iN1ka/9zmX1ZvLV9ewJYEk9h7RyRRtqdK0woXcqohu8EWIerfPUjYJPg0ULy0UqP7cslmdGc8xKDJcojlKiaw==} dev: true - /next-plugin-preact@3.0.6(@prefresh/babel-plugin@0.4.4)(next@13.1.6)(preact-render-to-string@5.1.19)(preact-ssr-prepass@1.2.0)(preact@10.18.1)(webpack@5.88.2): + /next-plugin-preact@3.0.6(@prefresh/babel-plugin@0.4.4)(next@14.0.2)(preact-render-to-string@5.1.19)(preact-ssr-prepass@1.2.0)(preact@10.18.1)(webpack@5.88.2): resolution: {integrity: sha512-Ze8c8h0jaCPbG0X9T5jJpSDtrfvU9NLlt+DJWtxOu2fn6qPbNU3s61F1hTcldZb3IbpXkp5iGnhPCdgGZEGrCQ==} requiresBuild: true peerDependencies: @@ -15466,7 +15453,7 @@ packages: preact-render-to-string: '>=5' preact-ssr-prepass: '>=1' dependencies: - '@prefresh/next': 1.4.7(next@13.1.6)(preact@10.18.1)(webpack@5.88.2) + '@prefresh/next': 1.4.7(next@14.0.2)(preact@10.18.1)(webpack@5.88.2) '@prefresh/webpack': 3.3.2(@prefresh/babel-plugin@0.4.4)(preact@10.18.1)(webpack@5.88.2) module-alias: 2.2.2 preact: 10.18.1 @@ -15478,55 +15465,50 @@ packages: - webpack dev: false - /next-router-mock@0.9.7(next@13.1.6)(react@18.2.0): + /next-router-mock@0.9.7(next@14.0.2)(react@18.2.0): resolution: {integrity: sha512-y5ioLCIsdkJKwcoPnrUyocNEJT22RK4wKSg6LO0Q2XkBBvkYprEWy5FiCZt+CA8+qpfxpBlNca76F+glEohbRA==} peerDependencies: next: '>=10.0.0' react: '>=17.0.0' dependencies: - next: 13.1.6(@babel/core@7.20.12)(react-dom@18.2.0)(react@18.2.0) + next: 14.0.2(@babel/core@7.20.12)(react-dom@18.2.0)(react@18.2.0) react: 18.2.0 dev: true - /next@13.1.6(@babel/core@7.20.12)(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-hHlbhKPj9pW+Cymvfzc15lvhaOZ54l+8sXDXJWm3OBNBzgrVj6hwGPmqqsXg40xO1Leq+kXpllzRPuncpC0Phw==} - engines: {node: '>=14.6.0'} + /next@14.0.2(@babel/core@7.20.12)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-jsAU2CkYS40GaQYOiLl9m93RTv2DA/tTJ0NRlmZIBIL87YwQ/xR8k796z7IqgM3jydI8G25dXvyYMC9VDIevIg==} + engines: {node: '>=18.17.0'} hasBin: true peerDependencies: - fibers: '>= 3.1.0' - node-sass: ^6.0.0 || ^7.0.0 + '@opentelemetry/api': ^1.1.0 react: ^18.2.0 react-dom: ^18.2.0 sass: ^1.3.0 peerDependenciesMeta: - fibers: - optional: true - node-sass: + '@opentelemetry/api': optional: true sass: optional: true dependencies: - '@next/env': 13.1.6 - '@swc/helpers': 0.4.14 + '@next/env': 14.0.2 + '@swc/helpers': 0.5.2 + busboy: 1.6.0 caniuse-lite: 1.0.30001447 - postcss: 8.4.14 + postcss: 8.4.31 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) styled-jsx: 5.1.1(@babel/core@7.20.12)(react@18.2.0) + watchpack: 2.4.0 optionalDependencies: - '@next/swc-android-arm-eabi': 13.1.6 - '@next/swc-android-arm64': 13.1.6 - '@next/swc-darwin-arm64': 13.1.6 - '@next/swc-darwin-x64': 13.1.6 - '@next/swc-freebsd-x64': 13.1.6 - '@next/swc-linux-arm-gnueabihf': 13.1.6 - '@next/swc-linux-arm64-gnu': 13.1.6 - '@next/swc-linux-arm64-musl': 13.1.6 - '@next/swc-linux-x64-gnu': 13.1.6 - '@next/swc-linux-x64-musl': 13.1.6 - '@next/swc-win32-arm64-msvc': 13.1.6 - '@next/swc-win32-ia32-msvc': 13.1.6 - '@next/swc-win32-x64-msvc': 13.1.6 + '@next/swc-darwin-arm64': 14.0.2 + '@next/swc-darwin-x64': 14.0.2 + '@next/swc-linux-arm64-gnu': 14.0.2 + '@next/swc-linux-arm64-musl': 14.0.2 + '@next/swc-linux-x64-gnu': 14.0.2 + '@next/swc-linux-x64-musl': 14.0.2 + '@next/swc-win32-arm64-msvc': 14.0.2 + '@next/swc-win32-ia32-msvc': 14.0.2 + '@next/swc-win32-x64-msvc': 14.0.2 transitivePeerDependencies: - '@babel/core' - babel-plugin-macros @@ -15539,7 +15521,7 @@ packages: resolution: {integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==} dependencies: lower-case: 2.0.2 - tslib: 2.4.1 + tslib: 2.6.2 dev: true /node-abi@2.30.1: @@ -16063,7 +16045,7 @@ packages: resolution: {integrity: sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==} dependencies: dot-case: 3.0.4 - tslib: 2.4.1 + tslib: 2.6.2 dev: true /parent-module@1.0.1: @@ -16136,7 +16118,7 @@ packages: resolution: {integrity: sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==} dependencies: no-case: 3.0.4 - tslib: 2.4.1 + tslib: 2.6.2 dev: true /pascalcase@0.1.1: @@ -16367,13 +16349,13 @@ packages: postcss: 7.0.39 dev: true - /postcss-modules-extract-imports@3.0.0(postcss@8.4.21): + /postcss-modules-extract-imports@3.0.0(postcss@8.4.31): resolution: {integrity: sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==} engines: {node: ^10 || ^12 || >= 14} peerDependencies: postcss: ^8.1.0 dependencies: - postcss: 8.4.21 + postcss: 8.4.31 dev: true /postcss-modules-local-by-default@3.0.3: @@ -16386,14 +16368,14 @@ packages: postcss-value-parser: 4.2.0 dev: true - /postcss-modules-local-by-default@4.0.0(postcss@8.4.21): + /postcss-modules-local-by-default@4.0.0(postcss@8.4.31): resolution: {integrity: sha512-sT7ihtmGSF9yhm6ggikHdV0hlziDTX7oFoXtuVWeDd3hHObNkcHRo9V3yg7vCAY7cONyxJC/XXCmmiHHcvX7bQ==} engines: {node: ^10 || ^12 || >= 14} peerDependencies: postcss: ^8.1.0 dependencies: - icss-utils: 5.1.0(postcss@8.4.21) - postcss: 8.4.21 + icss-utils: 5.1.0(postcss@8.4.31) + postcss: 8.4.31 postcss-selector-parser: 6.0.11 postcss-value-parser: 4.2.0 dev: true @@ -16406,13 +16388,13 @@ packages: postcss-selector-parser: 6.0.11 dev: true - /postcss-modules-scope@3.0.0(postcss@8.4.21): + /postcss-modules-scope@3.0.0(postcss@8.4.31): resolution: {integrity: sha512-hncihwFA2yPath8oZ15PZqvWGkWf+XUfQgUGamS4LqoP1anQLOsOJw0vr7J7IwLpoY9fatA2qiGUGmuZL0Iqlg==} engines: {node: ^10 || ^12 || >= 14} peerDependencies: postcss: ^8.1.0 dependencies: - postcss: 8.4.21 + postcss: 8.4.31 postcss-selector-parser: 6.0.11 dev: true @@ -16423,14 +16405,14 @@ packages: postcss: 7.0.39 dev: true - /postcss-modules-values@4.0.0(postcss@8.4.21): + /postcss-modules-values@4.0.0(postcss@8.4.31): resolution: {integrity: sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ==} engines: {node: ^10 || ^12 || >= 14} peerDependencies: postcss: ^8.1.0 dependencies: - icss-utils: 5.1.0(postcss@8.4.21) - postcss: 8.4.21 + icss-utils: 5.1.0(postcss@8.4.31) + postcss: 8.4.31 dev: true /postcss-selector-parser@6.0.11: @@ -16453,23 +16435,6 @@ packages: source-map: 0.6.1 dev: true - /postcss@8.4.14: - resolution: {integrity: sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==} - engines: {node: ^10 || ^12 || >=14} - dependencies: - nanoid: 3.3.4 - picocolors: 1.0.0 - source-map-js: 1.0.2 - - /postcss@8.4.21: - resolution: {integrity: sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==} - engines: {node: ^10 || ^12 || >=14} - dependencies: - nanoid: 3.3.4 - picocolors: 1.0.0 - source-map-js: 1.0.2 - dev: true - /postcss@8.4.31: resolution: {integrity: sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==} engines: {node: ^10 || ^12 || >=14} @@ -16477,7 +16442,6 @@ packages: nanoid: 3.3.6 picocolors: 1.0.0 source-map-js: 1.0.2 - dev: true /preact-render-to-string@5.1.19(preact@10.18.1): resolution: {integrity: sha512-bj8sn/oytIKO6RtOGSS/1+5CrQyRSC99eLUnEVbqUa6MzJX5dYh7wu9bmT0d6lm/Vea21k9KhCQwvr2sYN3rrQ==} @@ -17110,7 +17074,7 @@ packages: '@types/react': 17.0.15 react: 18.2.0 react-style-singleton: 2.2.1(@types/react@17.0.15)(react@18.2.0) - tslib: 2.4.1 + tslib: 2.6.2 dev: false /react-remove-scroll@2.5.5(@types/react@17.0.15)(react@18.2.0): @@ -17127,7 +17091,7 @@ packages: react: 18.2.0 react-remove-scroll-bar: 2.3.4(@types/react@17.0.15)(react@18.2.0) react-style-singleton: 2.2.1(@types/react@17.0.15)(react@18.2.0) - tslib: 2.4.1 + tslib: 2.6.2 use-callback-ref: 1.3.0(@types/react@17.0.15)(react@18.2.0) use-sidecar: 1.1.2(@types/react@17.0.15)(react@18.2.0) dev: false @@ -17166,7 +17130,7 @@ packages: get-nonce: 1.0.1 invariant: 2.2.4 react: 18.2.0 - tslib: 2.4.1 + tslib: 2.6.2 dev: false /react-test-renderer@18.2.0(react@18.2.0): @@ -18252,6 +18216,10 @@ packages: resolution: {integrity: sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==} dev: true + /streamsearch@1.1.0: + resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==} + engines: {node: '>=10.0.0'} + /string-argv@0.3.1: resolution: {integrity: sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==} engines: {node: '>=0.6.19'} @@ -18531,7 +18499,7 @@ packages: engines: {node: ^14.18.0 || >=16.0.0} dependencies: '@pkgr/utils': 2.3.1 - tslib: 2.4.1 + tslib: 2.6.2 dev: true /table@6.7.1: @@ -18949,10 +18917,10 @@ packages: /tslib@2.4.1: resolution: {integrity: sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==} + dev: false /tslib@2.6.2: resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} - dev: false /tsutils@3.21.0(typescript@4.8.4): resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} @@ -19312,7 +19280,7 @@ packages: dependencies: '@types/react': 17.0.15 react: 18.2.0 - tslib: 2.4.1 + tslib: 2.6.2 dev: false /use-events@1.4.2(react@18.2.0): @@ -19337,7 +19305,7 @@ packages: '@types/react': 17.0.15 detect-node-es: 1.1.0 react: 18.2.0 - tslib: 2.4.1 + tslib: 2.6.2 dev: false /use-sync-external-store@1.2.0(react@18.2.0): @@ -19496,7 +19464,7 @@ packages: engines: {node: '>=10.13.0'} dependencies: glob-to-regexp: 0.4.1 - graceful-fs: 4.2.10 + graceful-fs: 4.2.11 /web-api-hooks@3.0.2(react@18.2.0): resolution: {integrity: sha512-EQEGcHo1+FVINg5spKw05lBiN1/LhRK/K2xKnUmuLsLzz4sQK8Bk8qhj4RUgsh4LA7XXZqgJ43aQI+nvtMmIqA==} diff --git a/src/app/init.ts b/src/app/init.ts new file mode 100644 index 000000000..ab81496a8 --- /dev/null +++ b/src/app/init.ts @@ -0,0 +1,39 @@ +import { NetworkModes } from '@/common/types/network'; +import { IS_BROWSER } from '@/common/constants'; +import { + NetworkModeBtcAddressBaseUrlMap, + NetworkModeBtcBlockBaseUrlMap, + NetworkModeBtcTxBaseUrlMap, + NetworkModeUrlMap, +} from '@/common/constants/network'; +import { headers } from 'next/headers'; + +export function init(query: any) { + const headersList = headers(); + const queryNetworkMode = ((Array.isArray(query.chain) ? query.chain[0] : query.chain) || + NetworkModes.Mainnet) as NetworkModes; + const queryApiUrl = Array.isArray(query.api) ? query.api[0] : query.api; + const querySubnet = Array.isArray(query.subnet) ? query.subnet[0] : query.subnet; + const queryBtcBlockBaseUrl = Array.isArray(query.queryBtcBlockBaseUrl) + ? query.queryBtcBlockBaseUrl[0] + : query.queryBtcBlockBaseUrl; + const queryBtcTxBaseUrl = Array.isArray(query.queryBtcTxBaseUrl) + ? query.queryBtcTxBaseUrl[0] + : query.queryBtcTxBaseUrl; + const queryBtcAddressBaseUrl = Array.isArray(query.queryBtcAddressBaseUrl) + ? query.queryBtcAddressBaseUrl[0] + : query.queryBtcAddressBaseUrl; + return { + cookies: headersList.get('cookie') || (IS_BROWSER ? document?.cookie : ''), + // apiUrls: NetworkModeUrlMap, + // btcBlockBaseUrls: NetworkModeBtcBlockBaseUrlMap, + // btcTxBaseUrls: NetworkModeBtcTxBaseUrlMap, + // btcAddressBaseUrls: NetworkModeBtcAddressBaseUrlMap, + queryNetworkMode, + queryApiUrl, + queryBtcBlockBaseUrl, + queryBtcTxBaseUrl, + queryBtcAddressBaseUrl, + querySubnet, + }; +} diff --git a/src/app/layout.tsx b/src/app/layout.tsx index a62511424..a0ef517a0 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1,26 +1,18 @@ -import { PageWrapper } from '@/app/PageWrapper'; -import { cookies } from 'next/headers'; +import { ReactNode } from 'react'; +import { GlobalStyles, PrismTheme, TextAreaOverrides } from '@/global-styles'; -import { Providers } from './Providers'; -import './global-style/code-editor.css'; -import './global-style/global.css'; -import './global-style/prism-theme.css'; +export const metadata = { + title: 'Next.js', + description: 'Generated by Next.js', +}; -const colorModeCookieName = 'chakra-ui-color-mode'; - -export default function RootLayout({ children }: any) { - const colorModeCookie = cookies().get(colorModeCookieName) || { - name: colorModeCookieName, - value: 'light', - }; +export default function RootLayout({ children }: { children: ReactNode }) { return ( - - - - {children} - - + {GlobalStyles} + {TextAreaOverrides} + {PrismTheme} + {children} ); } diff --git a/src/app/test/error.tsx b/src/app/test/error.tsx new file mode 100644 index 000000000..d4252da24 --- /dev/null +++ b/src/app/test/error.tsx @@ -0,0 +1,47 @@ +'use client'; + +import { MessageWithIcon } from '@/components/message-with-icon'; +import { Section } from '@/components/section'; +import { Box, Grid, Stack } from '@/ui/components'; +import { Title } from '@/ui/typography'; +import * as Sentry from '@sentry/nextjs'; +import * as React from 'react'; +import { useEffect } from 'react'; +import { TbAlertOctagon } from 'react-icons/tb'; + +export default function Error({ error, reset }: { error: any; reset: () => void }) { + useEffect(() => { + console.error(error); + if (error.status === 404) return; + Sentry.captureException(error); + }, [error]); + return

Error!!!!!

; + // return ( + // <> + // + // Something went wrong! + // + //
+ // + // + // + // + // Go home + // + // + // + // + // + // } + // /> + // + // + //
+ // + // ); +} diff --git a/src/app/test/head.tsx b/src/app/test/head.tsx new file mode 100644 index 000000000..80fbf8733 --- /dev/null +++ b/src/app/test/head.tsx @@ -0,0 +1,12 @@ +import { DefaultHeadTags } from '@/appPages/DefaultHeadTags'; +import { defaultTitle } from '@/appPages/common/consts/head'; + +export default function Head() { + return ( + <> + {defaultTitle} + + + + ); +} diff --git a/src/app/test/layout.tsx b/src/app/test/layout.tsx new file mode 100644 index 000000000..891b3a6e2 --- /dev/null +++ b/src/app/test/layout.tsx @@ -0,0 +1,45 @@ +import { PageWrapper } from '@/appPages/PageWrapper'; +import { headers } from 'next/headers'; + +import { Providers } from '@/appPages/Providers'; +import AppError from '@/appPages/error'; +import * as React from 'react'; +import { ErrorBoundary } from 'react-error-boundary'; +import { AppContextProvider } from '@/common/context/GlobalContext'; +import { IS_BROWSER } from '@/common/constants'; +import { + NetworkModeBtcAddressBaseUrlMap, + NetworkModeBtcBlockBaseUrlMap, + NetworkModeBtcTxBaseUrlMap, + NetworkModeUrlMap, +} from '@/common/constants/network'; + +export default function RootLayout(all: any) { + const headersList = headers(); + console.log('NetworkModeUrlMap', NetworkModeUrlMap); + return ( + + + + { + 'use server'; + return ; + }} + > + + + {all.children} + + + + + + ); +} diff --git a/src/app/test/loading.tsx b/src/app/test/loading.tsx new file mode 100644 index 000000000..371dbd921 --- /dev/null +++ b/src/app/test/loading.tsx @@ -0,0 +1,3 @@ +export default function Loading() { + return

loading...

; +} diff --git a/src/app/test/page.tsx b/src/app/test/page.tsx new file mode 100644 index 000000000..392bf47bd --- /dev/null +++ b/src/app/test/page.tsx @@ -0,0 +1,12 @@ +import { HomeClient } from '@/appPages/HomeClient'; +import { FC } from 'react'; + +const Home: FC<{ + params: { slug: string }; + searchParams?: { [key: string]: string | string[] | undefined }; +}> = ({ params, searchParams }) => { + console.log('[DEBUG] test page', params, searchParams); + return ; +}; + +export default Home; diff --git a/src/app/DefaultHeadTags.tsx b/src/appPages/DefaultHeadTags.tsx similarity index 100% rename from src/app/DefaultHeadTags.tsx rename to src/appPages/DefaultHeadTags.tsx diff --git a/src/app/HomeClient.tsx b/src/appPages/HomeClient.tsx similarity index 97% rename from src/app/HomeClient.tsx rename to src/appPages/HomeClient.tsx index a326b6f48..a653f88f2 100644 --- a/src/app/HomeClient.tsx +++ b/src/appPages/HomeClient.tsx @@ -6,6 +6,7 @@ import { Grid } from '@/ui/Grid'; import { Title } from '@/ui/typography'; import * as React from 'react'; import { FC } from 'react'; +import { Text } from '@chakra-ui/react'; import { DefaultTxListTabs } from './common/components/tx-lists/tabs/DefaultTxListTabs'; import { BlocksList } from './components/BlockList'; @@ -38,7 +39,6 @@ export const HomeClientBase: FC = () => { {!activeNetwork.isSubnet && } - ); diff --git a/src/app/PageWrapper.tsx b/src/appPages/PageWrapper.tsx similarity index 97% rename from src/app/PageWrapper.tsx rename to src/appPages/PageWrapper.tsx index d1bba46b5..01f0ab8d1 100644 --- a/src/app/PageWrapper.tsx +++ b/src/appPages/PageWrapper.tsx @@ -16,7 +16,7 @@ import { Box } from '@/ui/Box'; import { Flex } from '@/ui/Flex'; import { useColorMode } from '@chakra-ui/react'; import { FC, ReactNode } from 'react'; -import { NavBar } from '@/app/components/NavBar'; +import { NavBar } from '@/appPages/components/NavBar'; export const PageWrapper: FC<{ children: ReactNode }> = ({ children }) => { const colorMode = useColorMode().colorMode; diff --git a/src/app/Providers.tsx b/src/appPages/Providers.tsx similarity index 69% rename from src/app/Providers.tsx rename to src/appPages/Providers.tsx index dcee94fed..b9eda4d84 100644 --- a/src/app/Providers.tsx +++ b/src/appPages/Providers.tsx @@ -8,6 +8,8 @@ import { FC } from 'react'; import { CookiesProvider } from 'react-cookie'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { Provider } from 'react-redux'; +import { useSearchParams } from 'next/navigation'; +import { NetworkModes } from '@/common/types/network'; const queryClient = new QueryClient({ defaultOptions: { @@ -20,14 +22,13 @@ const queryClient = new QueryClient({ }, }, }); -export const Providers: FC = ({ - children, - cookies, - queryNetworkMode, - queryApiUrl, - querySubnet, - apiUrls, -}) => { +export const Providers: FC = ({ children, cookies }) => { + const { chain, api, subnet } = useSearchParams(); + + const queryNetworkMode = ((Array.isArray(chain) ? chain[0] : chain) || + NetworkModes.Mainnet) as NetworkModes; + const queryApiUrl = Array.isArray(api) ? api[0] : api; + const querySubnet = Array.isArray(subnet) ? subnet[0] : subnet; return ( diff --git a/src/app/address/[principal]/error.tsx b/src/appPages/address/[principal]/error.tsx similarity index 100% rename from src/app/address/[principal]/error.tsx rename to src/appPages/address/[principal]/error.tsx diff --git a/src/app/address/[principal]/head.tsx b/src/appPages/address/[principal]/head.tsx similarity index 100% rename from src/app/address/[principal]/head.tsx rename to src/appPages/address/[principal]/head.tsx diff --git a/src/app/address/[principal]/page.tsx b/src/appPages/address/[principal]/page.tsx similarity index 91% rename from src/app/address/[principal]/page.tsx rename to src/appPages/address/[principal]/page.tsx index c85f60c57..2a6ec96d9 100644 --- a/src/app/address/[principal]/page.tsx +++ b/src/appPages/address/[principal]/page.tsx @@ -1,8 +1,8 @@ 'use client'; -import { PageTitle } from '@/app/common/components/PageTitle'; -import { useAccountBalance } from '@/app/common/queries/useAccountBalance'; -import { useNftHoldings } from '@/app/common/queries/useNftHoldings'; +import { PageTitle } from '@/appPages/common/components/PageTitle'; +import { useAccountBalance } from '@/appPages/common/queries/useAccountBalance'; +import { useNftHoldings } from '@/appPages/common/queries/useNftHoldings'; import { useApi } from '@/common/api/client'; import { microStxToStx, truncateMiddle } from '@/common/utils'; import { hasTokenBalance } from '@/common/utils/accounts'; diff --git a/src/app/block/[hash]/error.tsx b/src/appPages/block/[hash]/error.tsx similarity index 100% rename from src/app/block/[hash]/error.tsx rename to src/appPages/block/[hash]/error.tsx diff --git a/src/app/block/[hash]/head.tsx b/src/appPages/block/[hash]/head.tsx similarity index 100% rename from src/app/block/[hash]/head.tsx rename to src/appPages/block/[hash]/head.tsx diff --git a/src/app/block/[hash]/page.tsx b/src/appPages/block/[hash]/page.tsx similarity index 98% rename from src/app/block/[hash]/page.tsx rename to src/appPages/block/[hash]/page.tsx index 2d65703f5..1056d5843 100644 --- a/src/app/block/[hash]/page.tsx +++ b/src/appPages/block/[hash]/page.tsx @@ -1,6 +1,6 @@ 'use client'; -import { PageTitle } from '@/app/common/components/PageTitle'; +import { PageTitle } from '@/appPages/common/components/PageTitle'; import { useGlobalContext } from '@/common/context/useAppContext'; import { BtcStxBlockLinks } from '@/components/btc-stx-block-links'; import { FilterButton } from '@/components/filter-button'; diff --git a/src/app/block/[hash]/tx-lists/BlockTxsList.tsx b/src/appPages/block/[hash]/tx-lists/BlockTxsList.tsx similarity index 100% rename from src/app/block/[hash]/tx-lists/BlockTxsList.tsx rename to src/appPages/block/[hash]/tx-lists/BlockTxsList.tsx diff --git a/src/app/blocks/head.tsx b/src/appPages/blocks/head.tsx similarity index 100% rename from src/app/blocks/head.tsx rename to src/appPages/blocks/head.tsx diff --git a/src/app/blocks/loading.tsx b/src/appPages/blocks/loading.tsx similarity index 100% rename from src/app/blocks/loading.tsx rename to src/appPages/blocks/loading.tsx diff --git a/src/app/blocks/page.tsx b/src/appPages/blocks/page.tsx similarity index 83% rename from src/app/blocks/page.tsx rename to src/appPages/blocks/page.tsx index ed520607d..b3f2d058c 100644 --- a/src/app/blocks/page.tsx +++ b/src/appPages/blocks/page.tsx @@ -1,6 +1,6 @@ 'use client'; -import { PageTitle } from '@/app/common/components/PageTitle'; +import { PageTitle } from '@/appPages/common/components/PageTitle'; import { Flex } from '@/ui/components'; import type { NextPage } from 'next'; import * as React from 'react'; diff --git a/src/app/common/claritySyntax.ts b/src/appPages/common/claritySyntax.ts similarity index 100% rename from src/app/common/claritySyntax.ts rename to src/appPages/common/claritySyntax.ts diff --git a/src/app/common/components/ContractAvailableFunctions.tsx b/src/appPages/common/components/ContractAvailableFunctions.tsx similarity index 84% rename from src/app/common/components/ContractAvailableFunctions.tsx rename to src/appPages/common/components/ContractAvailableFunctions.tsx index 310f7aaa8..63a8e4629 100644 --- a/src/app/common/components/ContractAvailableFunctions.tsx +++ b/src/appPages/common/components/ContractAvailableFunctions.tsx @@ -1,16 +1,16 @@ import { FC, useState } from 'react'; import { ContractWithParsedAbi } from '@/common/types/contract'; -import { useUser } from '@/app/sandbox/hooks/useUser'; +import { useUser } from '@/appPages/sandbox/hooks/useUser'; import { useAppDispatch } from '@/common/state/hooks'; import { Flex } from '@/ui/Flex'; import { Button } from '@/ui/Button'; -import { setUserData } from '@/app/sandbox/sandbox-slice'; -import { FunctionView } from '@/app/sandbox/components/ContractCall/FunctionView'; +import { setUserData } from '@/appPages/sandbox/sandbox-slice'; +import { FunctionView } from '@/appPages/sandbox/components/ContractCall/FunctionView'; import { ClarityAbiFunction } from '@stacks/transactions'; import { TextLink } from '@/ui/TextLink'; import { Caption } from '@/ui/typography'; -import { showFn } from '@/app/common/utils/sandbox'; -import { AbiFunction } from '@/app/sandbox/components/ContractCall/AvailableFunctionsView'; +import { showFn } from '@/appPages/common/utils/sandbox'; +import { AbiFunction } from '@/appPages/sandbox/components/ContractCall/AvailableFunctionsView'; export const ContractAvailableFunctions: FC<{ contractId: string; diff --git a/src/app/common/components/CopyButton.tsx b/src/appPages/common/components/CopyButton.tsx similarity index 100% rename from src/app/common/components/CopyButton.tsx rename to src/appPages/common/components/CopyButton.tsx diff --git a/src/app/common/components/KeyValueHorizontal.tsx b/src/appPages/common/components/KeyValueHorizontal.tsx similarity index 100% rename from src/app/common/components/KeyValueHorizontal.tsx rename to src/appPages/common/components/KeyValueHorizontal.tsx diff --git a/src/app/common/components/KeyValueVertical.tsx b/src/appPages/common/components/KeyValueVertical.tsx similarity index 100% rename from src/app/common/components/KeyValueVertical.tsx rename to src/appPages/common/components/KeyValueVertical.tsx diff --git a/src/app/common/components/ListItem.tsx b/src/appPages/common/components/ListItem.tsx similarity index 100% rename from src/app/common/components/ListItem.tsx rename to src/appPages/common/components/ListItem.tsx diff --git a/src/app/common/components/PageTitle.tsx b/src/appPages/common/components/PageTitle.tsx similarity index 100% rename from src/app/common/components/PageTitle.tsx rename to src/appPages/common/components/PageTitle.tsx diff --git a/src/app/common/components/StxPriceButton/index.tsx b/src/appPages/common/components/StxPriceButton/index.tsx similarity index 100% rename from src/app/common/components/StxPriceButton/index.tsx rename to src/appPages/common/components/StxPriceButton/index.tsx diff --git a/src/app/common/components/StxPriceButton/useStxPriceForTx.ts b/src/appPages/common/components/StxPriceButton/useStxPriceForTx.ts similarity index 100% rename from src/app/common/components/StxPriceButton/useStxPriceForTx.ts rename to src/appPages/common/components/StxPriceButton/useStxPriceForTx.ts diff --git a/src/app/common/components/TabsContainer.tsx b/src/appPages/common/components/TabsContainer.tsx similarity index 100% rename from src/app/common/components/TabsContainer.tsx rename to src/appPages/common/components/TabsContainer.tsx diff --git a/src/app/common/components/TwoColumnPage.tsx b/src/appPages/common/components/TwoColumnPage.tsx similarity index 100% rename from src/app/common/components/TwoColumnPage.tsx rename to src/appPages/common/components/TwoColumnPage.tsx diff --git a/src/app/common/components/TxIcon.tsx b/src/appPages/common/components/TxIcon.tsx similarity index 100% rename from src/app/common/components/TxIcon.tsx rename to src/appPages/common/components/TxIcon.tsx diff --git a/src/app/common/components/Value.tsx b/src/appPages/common/components/Value.tsx similarity index 100% rename from src/app/common/components/Value.tsx rename to src/appPages/common/components/Value.tsx diff --git a/src/app/common/components/__tests__/TabsContainer.test.tsx b/src/appPages/common/components/__tests__/TabsContainer.test.tsx similarity index 100% rename from src/app/common/components/__tests__/TabsContainer.test.tsx rename to src/appPages/common/components/__tests__/TabsContainer.test.tsx diff --git a/src/app/common/components/skeletons/SSRSkeletonBlockList.tsx b/src/appPages/common/components/skeletons/SSRSkeletonBlockList.tsx similarity index 100% rename from src/app/common/components/skeletons/SSRSkeletonBlockList.tsx rename to src/appPages/common/components/skeletons/SSRSkeletonBlockList.tsx diff --git a/src/app/common/components/skeletons/SSRSkeletonTxList.tsx b/src/appPages/common/components/skeletons/SSRSkeletonTxList.tsx similarity index 100% rename from src/app/common/components/skeletons/SSRSkeletonTxList.tsx rename to src/appPages/common/components/skeletons/SSRSkeletonTxList.tsx diff --git a/src/app/common/components/tx-lists/address-lists/AddressConfirmedTxsList.tsx b/src/appPages/common/components/tx-lists/address-lists/AddressConfirmedTxsList.tsx similarity index 100% rename from src/app/common/components/tx-lists/address-lists/AddressConfirmedTxsList.tsx rename to src/appPages/common/components/tx-lists/address-lists/AddressConfirmedTxsList.tsx diff --git a/src/app/common/components/tx-lists/address-lists/AddressMempoolTxsList.tsx b/src/appPages/common/components/tx-lists/address-lists/AddressMempoolTxsList.tsx similarity index 100% rename from src/app/common/components/tx-lists/address-lists/AddressMempoolTxsList.tsx rename to src/appPages/common/components/tx-lists/address-lists/AddressMempoolTxsList.tsx diff --git a/src/app/common/components/tx-lists/common/components/FilteredTxs.tsx b/src/appPages/common/components/tx-lists/common/components/FilteredTxs.tsx similarity index 100% rename from src/app/common/components/tx-lists/common/components/FilteredTxs.tsx rename to src/appPages/common/components/tx-lists/common/components/FilteredTxs.tsx diff --git a/src/app/common/components/tx-lists/common/types/transfers.ts b/src/appPages/common/components/tx-lists/common/types/transfers.ts similarity index 100% rename from src/app/common/components/tx-lists/common/types/transfers.ts rename to src/appPages/common/components/tx-lists/common/types/transfers.ts diff --git a/src/app/common/components/tx-lists/common/utils/tx.tsx b/src/appPages/common/components/tx-lists/common/utils/tx.tsx similarity index 97% rename from src/app/common/components/tx-lists/common/utils/tx.tsx rename to src/appPages/common/components/tx-lists/common/utils/tx.tsx index deff3ee3d..0b2bdf375 100644 --- a/src/app/common/components/tx-lists/common/utils/tx.tsx +++ b/src/appPages/common/components/tx-lists/common/utils/tx.tsx @@ -1,4 +1,4 @@ -import { buildUrl } from '@/app/common/utils/buildUrl'; +import { buildUrl } from '@/appPages/common/utils/buildUrl'; import { useGlobalContext } from '@/common/context/useAppContext'; import { getContractName, getFunctionName, microToStacks } from '@/common/utils'; import { Flex } from '@/ui/Flex'; diff --git a/src/app/common/components/tx-lists/default-lists/ConfirmedTxsList.tsx b/src/appPages/common/components/tx-lists/default-lists/ConfirmedTxsList.tsx similarity index 100% rename from src/app/common/components/tx-lists/default-lists/ConfirmedTxsList.tsx rename to src/appPages/common/components/tx-lists/default-lists/ConfirmedTxsList.tsx diff --git a/src/app/common/components/tx-lists/default-lists/MempoolTxsList.tsx b/src/appPages/common/components/tx-lists/default-lists/MempoolTxsList.tsx similarity index 100% rename from src/app/common/components/tx-lists/default-lists/MempoolTxsList.tsx rename to src/appPages/common/components/tx-lists/default-lists/MempoolTxsList.tsx diff --git a/src/app/common/components/tx-lists/list-items/FtTransfers.tsx b/src/appPages/common/components/tx-lists/list-items/FtTransfers.tsx similarity index 96% rename from src/app/common/components/tx-lists/list-items/FtTransfers.tsx rename to src/appPages/common/components/tx-lists/list-items/FtTransfers.tsx index fde398882..9bc5f2256 100644 --- a/src/app/common/components/tx-lists/list-items/FtTransfers.tsx +++ b/src/appPages/common/components/tx-lists/list-items/FtTransfers.tsx @@ -1,4 +1,4 @@ -import { useFtMetadata } from '@/app/common/queries/useFtMetadata'; +import { useFtMetadata } from '@/appPages/common/queries/useFtMetadata'; import { useApi } from '@/common/api/client'; import { ftDecimals, getAssetNameParts } from '@/common/utils'; import { getTicker } from '@/components/tx-events'; diff --git a/src/app/common/components/tx-lists/list-items/MempoolTxListItem.tsx b/src/appPages/common/components/tx-lists/list-items/MempoolTxListItem.tsx similarity index 97% rename from src/app/common/components/tx-lists/list-items/MempoolTxListItem.tsx rename to src/appPages/common/components/tx-lists/list-items/MempoolTxListItem.tsx index 56889e343..9391b0117 100644 --- a/src/app/common/components/tx-lists/list-items/MempoolTxListItem.tsx +++ b/src/appPages/common/components/tx-lists/list-items/MempoolTxListItem.tsx @@ -1,4 +1,4 @@ -import { buildUrl } from '@/app/common/utils/buildUrl'; +import { buildUrl } from '@/appPages/common/utils/buildUrl'; import { TwoColsListItem } from '@/common/components/TwoColumnsListItem'; import { useGlobalContext } from '@/common/context/useAppContext'; import { getTransactionStatus } from '@/common/utils/transactions'; diff --git a/src/app/common/components/tx-lists/list-items/MempoolTxListItemMini.tsx b/src/appPages/common/components/tx-lists/list-items/MempoolTxListItemMini.tsx similarity index 96% rename from src/app/common/components/tx-lists/list-items/MempoolTxListItemMini.tsx rename to src/appPages/common/components/tx-lists/list-items/MempoolTxListItemMini.tsx index d4eb7071d..ec8951fc7 100644 --- a/src/app/common/components/tx-lists/list-items/MempoolTxListItemMini.tsx +++ b/src/appPages/common/components/tx-lists/list-items/MempoolTxListItemMini.tsx @@ -1,4 +1,4 @@ -import { buildUrl } from '@/app/common/utils/buildUrl'; +import { buildUrl } from '@/appPages/common/utils/buildUrl'; import { TwoColsListItem } from '@/common/components/TwoColumnsListItem'; import { useGlobalContext } from '@/common/context/useAppContext'; import { getTransactionStatus } from '@/common/utils/transactions'; diff --git a/src/app/common/components/tx-lists/list-items/NftTransfers.tsx b/src/appPages/common/components/tx-lists/list-items/NftTransfers.tsx similarity index 100% rename from src/app/common/components/tx-lists/list-items/NftTransfers.tsx rename to src/appPages/common/components/tx-lists/list-items/NftTransfers.tsx diff --git a/src/app/common/components/tx-lists/list-items/StxTransfers.tsx b/src/appPages/common/components/tx-lists/list-items/StxTransfers.tsx similarity index 100% rename from src/app/common/components/tx-lists/list-items/StxTransfers.tsx rename to src/appPages/common/components/tx-lists/list-items/StxTransfers.tsx diff --git a/src/app/common/components/tx-lists/list-items/TransferListItem.tsx b/src/appPages/common/components/tx-lists/list-items/TransferListItem.tsx similarity index 97% rename from src/app/common/components/tx-lists/list-items/TransferListItem.tsx rename to src/appPages/common/components/tx-lists/list-items/TransferListItem.tsx index 3df8f981b..6346d0d6f 100644 --- a/src/app/common/components/tx-lists/list-items/TransferListItem.tsx +++ b/src/appPages/common/components/tx-lists/list-items/TransferListItem.tsx @@ -1,4 +1,4 @@ -import { buildUrl } from '@/app/common/utils/buildUrl'; +import { buildUrl } from '@/appPages/common/utils/buildUrl'; import { TwoColsListItem } from '@/common/components/TwoColumnsListItem'; import { useGlobalContext } from '@/common/context/useAppContext'; import { PrincipalLink } from '@/components/transaction-item'; diff --git a/src/app/common/components/tx-lists/list-items/TxListItem.tsx b/src/appPages/common/components/tx-lists/list-items/TxListItem.tsx similarity index 98% rename from src/app/common/components/tx-lists/list-items/TxListItem.tsx rename to src/appPages/common/components/tx-lists/list-items/TxListItem.tsx index e78d9cbfc..f24753f95 100644 --- a/src/app/common/components/tx-lists/list-items/TxListItem.tsx +++ b/src/appPages/common/components/tx-lists/list-items/TxListItem.tsx @@ -1,4 +1,4 @@ -import { buildUrl } from '@/app/common/utils/buildUrl'; +import { buildUrl } from '@/appPages/common/utils/buildUrl'; import { TwoColsListItem } from '@/common/components/TwoColumnsListItem'; import { useGlobalContext } from '@/common/context/useAppContext'; import { truncateMiddle } from '@/common/utils'; diff --git a/src/app/common/components/tx-lists/list-items/TxListItemMini.tsx b/src/appPages/common/components/tx-lists/list-items/TxListItemMini.tsx similarity index 96% rename from src/app/common/components/tx-lists/list-items/TxListItemMini.tsx rename to src/appPages/common/components/tx-lists/list-items/TxListItemMini.tsx index 9b017830d..a88cfdb3f 100644 --- a/src/app/common/components/tx-lists/list-items/TxListItemMini.tsx +++ b/src/appPages/common/components/tx-lists/list-items/TxListItemMini.tsx @@ -1,4 +1,4 @@ -import { buildUrl } from '@/app/common/utils/buildUrl'; +import { buildUrl } from '@/appPages/common/utils/buildUrl'; import { TwoColsListItem } from '@/common/components/TwoColumnsListItem'; import { useGlobalContext } from '@/common/context/useAppContext'; import { getTransactionStatus } from '@/common/utils/transactions'; diff --git a/src/app/common/components/tx-lists/list-items/TxWithTransferListItem.tsx b/src/appPages/common/components/tx-lists/list-items/TxWithTransferListItem.tsx similarity index 93% rename from src/app/common/components/tx-lists/list-items/TxWithTransferListItem.tsx rename to src/appPages/common/components/tx-lists/list-items/TxWithTransferListItem.tsx index 8621b9130..143aa3131 100644 --- a/src/app/common/components/tx-lists/list-items/TxWithTransferListItem.tsx +++ b/src/appPages/common/components/tx-lists/list-items/TxWithTransferListItem.tsx @@ -1,5 +1,5 @@ -import { getTransactionTypeLabel } from '@/app/common/components/tx-lists/utils/tx'; -import { useVerticallyStackedElementsBorderStyle } from '@/app/common/styles/border'; +import { getTransactionTypeLabel } from '@/appPages/common/components/tx-lists/utils/tx'; +import { useVerticallyStackedElementsBorderStyle } from '@/appPages/common/styles/border'; import { AddressArea } from '@/components/transaction-item'; import { Text } from '@/ui/Text'; import { diff --git a/src/app/common/components/tx-lists/tabs/AddressTxListTabs.tsx b/src/appPages/common/components/tx-lists/tabs/AddressTxListTabs.tsx similarity index 100% rename from src/app/common/components/tx-lists/tabs/AddressTxListTabs.tsx rename to src/appPages/common/components/tx-lists/tabs/AddressTxListTabs.tsx diff --git a/src/app/common/components/tx-lists/tabs/DefaultTxListTabs.tsx b/src/appPages/common/components/tx-lists/tabs/DefaultTxListTabs.tsx similarity index 100% rename from src/app/common/components/tx-lists/tabs/DefaultTxListTabs.tsx rename to src/appPages/common/components/tx-lists/tabs/DefaultTxListTabs.tsx diff --git a/src/app/common/components/tx-lists/tabs/TxListTabs.tsx b/src/appPages/common/components/tx-lists/tabs/TxListTabs.tsx similarity index 93% rename from src/app/common/components/tx-lists/tabs/TxListTabs.tsx rename to src/appPages/common/components/tx-lists/tabs/TxListTabs.tsx index eb2ef6710..41de3f5c2 100644 --- a/src/app/common/components/tx-lists/tabs/TxListTabs.tsx +++ b/src/appPages/common/components/tx-lists/tabs/TxListTabs.tsx @@ -5,7 +5,7 @@ import { TabsProps } from '@/ui/Tabs'; import * as React from 'react'; import { FC, ReactNode } from 'react'; import { usePathname } from 'next/navigation'; -import { TabsContainer } from '@/app/common/components/TabsContainer'; +import { TabsContainer } from '@/appPages/common/components/TabsContainer'; export const TxListTabs: FC< { diff --git a/src/app/common/components/tx-lists/tabs/__tests__/TxListTabs.test.tsx b/src/appPages/common/components/tx-lists/tabs/__tests__/TxListTabs.test.tsx similarity index 100% rename from src/app/common/components/tx-lists/tabs/__tests__/TxListTabs.test.tsx rename to src/appPages/common/components/tx-lists/tabs/__tests__/TxListTabs.test.tsx diff --git a/src/app/common/components/tx-lists/utils/tx.ts b/src/appPages/common/components/tx-lists/utils/tx.ts similarity index 100% rename from src/app/common/components/tx-lists/utils/tx.ts rename to src/appPages/common/components/tx-lists/utils/tx.ts diff --git a/src/app/common/consts/head.ts b/src/appPages/common/consts/head.ts similarity index 100% rename from src/app/common/consts/head.ts rename to src/appPages/common/consts/head.ts diff --git a/src/app/common/hooks/use-current-prices.ts b/src/appPages/common/hooks/use-current-prices.ts similarity index 100% rename from src/app/common/hooks/use-current-prices.ts rename to src/appPages/common/hooks/use-current-prices.ts diff --git a/src/app/common/hooks/use-debounce.ts b/src/appPages/common/hooks/use-debounce.ts similarity index 100% rename from src/app/common/hooks/use-debounce.ts rename to src/appPages/common/hooks/use-debounce.ts diff --git a/src/app/common/hooks/use-filter-state.tsx b/src/appPages/common/hooks/use-filter-state.tsx similarity index 100% rename from src/app/common/hooks/use-filter-state.tsx rename to src/appPages/common/hooks/use-filter-state.tsx diff --git a/src/app/common/hooks/use-random-name.tsx b/src/appPages/common/hooks/use-random-name.tsx similarity index 100% rename from src/app/common/hooks/use-random-name.tsx rename to src/appPages/common/hooks/use-random-name.tsx diff --git a/src/app/common/hooks/use-stacks-network.ts b/src/appPages/common/hooks/use-stacks-network.ts similarity index 100% rename from src/app/common/hooks/use-stacks-network.ts rename to src/appPages/common/hooks/use-stacks-network.ts diff --git a/src/app/common/hooks/useInfiniteQueryResult.ts b/src/appPages/common/hooks/useInfiniteQueryResult.ts similarity index 100% rename from src/app/common/hooks/useInfiniteQueryResult.ts rename to src/appPages/common/hooks/useInfiniteQueryResult.ts diff --git a/src/app/common/queries/query-stale-time.ts b/src/appPages/common/queries/query-stale-time.ts similarity index 100% rename from src/app/common/queries/query-stale-time.ts rename to src/appPages/common/queries/query-stale-time.ts diff --git a/src/app/common/queries/useAccountBalance.ts b/src/appPages/common/queries/useAccountBalance.ts similarity index 100% rename from src/app/common/queries/useAccountBalance.ts rename to src/appPages/common/queries/useAccountBalance.ts diff --git a/src/app/common/queries/useAddressConfirmedTxsWithTransfersInfinite.ts b/src/appPages/common/queries/useAddressConfirmedTxsWithTransfersInfinite.ts similarity index 100% rename from src/app/common/queries/useAddressConfirmedTxsWithTransfersInfinite.ts rename to src/appPages/common/queries/useAddressConfirmedTxsWithTransfersInfinite.ts diff --git a/src/app/common/queries/useAddressMempoolTxsInfinite.ts b/src/appPages/common/queries/useAddressMempoolTxsInfinite.ts similarity index 100% rename from src/app/common/queries/useAddressMempoolTxsInfinite.ts rename to src/appPages/common/queries/useAddressMempoolTxsInfinite.ts diff --git a/src/app/common/queries/useAddressNonces.ts b/src/appPages/common/queries/useAddressNonces.ts similarity index 100% rename from src/app/common/queries/useAddressNonces.ts rename to src/appPages/common/queries/useAddressNonces.ts diff --git a/src/app/common/queries/useBlockByHash.ts b/src/appPages/common/queries/useBlockByHash.ts similarity index 100% rename from src/app/common/queries/useBlockByHash.ts rename to src/appPages/common/queries/useBlockByHash.ts diff --git a/src/app/common/queries/useBlockListInfinite.ts b/src/appPages/common/queries/useBlockListInfinite.ts similarity index 100% rename from src/app/common/queries/useBlockListInfinite.ts rename to src/appPages/common/queries/useBlockListInfinite.ts diff --git a/src/app/common/queries/useBlockTxsInfinite.ts b/src/appPages/common/queries/useBlockTxsInfinite.ts similarity index 100% rename from src/app/common/queries/useBlockTxsInfinite.ts rename to src/appPages/common/queries/useBlockTxsInfinite.ts diff --git a/src/app/common/queries/useConfirmedTransactionsInfinite.ts b/src/appPages/common/queries/useConfirmedTransactionsInfinite.ts similarity index 100% rename from src/app/common/queries/useConfirmedTransactionsInfinite.ts rename to src/appPages/common/queries/useConfirmedTransactionsInfinite.ts diff --git a/src/app/common/queries/useContractById.ts b/src/appPages/common/queries/useContractById.ts similarity index 100% rename from src/app/common/queries/useContractById.ts rename to src/appPages/common/queries/useContractById.ts diff --git a/src/app/common/queries/useCoreApiInfo.ts b/src/appPages/common/queries/useCoreApiInfo.ts similarity index 100% rename from src/app/common/queries/useCoreApiInfo.ts rename to src/appPages/common/queries/useCoreApiInfo.ts diff --git a/src/app/common/queries/useFtMetadata.ts b/src/appPages/common/queries/useFtMetadata.ts similarity index 100% rename from src/app/common/queries/useFtMetadata.ts rename to src/appPages/common/queries/useFtMetadata.ts diff --git a/src/app/common/queries/useMempoolTransactionsInfinite.ts b/src/appPages/common/queries/useMempoolTransactionsInfinite.ts similarity index 100% rename from src/app/common/queries/useMempoolTransactionsInfinite.ts rename to src/appPages/common/queries/useMempoolTransactionsInfinite.ts diff --git a/src/app/common/queries/useMicroblockByHash.ts b/src/appPages/common/queries/useMicroblockByHash.ts similarity index 100% rename from src/app/common/queries/useMicroblockByHash.ts rename to src/appPages/common/queries/useMicroblockByHash.ts diff --git a/src/app/common/queries/useNftHoldings.ts b/src/appPages/common/queries/useNftHoldings.ts similarity index 100% rename from src/app/common/queries/useNftHoldings.ts rename to src/appPages/common/queries/useNftHoldings.ts diff --git a/src/app/common/queries/useNftMetadata.ts b/src/appPages/common/queries/useNftMetadata.ts similarity index 100% rename from src/app/common/queries/useNftMetadata.ts rename to src/appPages/common/queries/useNftMetadata.ts diff --git a/src/app/common/queries/useTxById.ts b/src/appPages/common/queries/useTxById.ts similarity index 100% rename from src/app/common/queries/useTxById.ts rename to src/appPages/common/queries/useTxById.ts diff --git a/src/app/common/server-calls/fetchClaritySyntax.ts b/src/appPages/common/server-calls/fetchClaritySyntax.ts similarity index 100% rename from src/app/common/server-calls/fetchClaritySyntax.ts rename to src/appPages/common/server-calls/fetchClaritySyntax.ts diff --git a/src/app/common/styles/border.ts b/src/appPages/common/styles/border.ts similarity index 100% rename from src/app/common/styles/border.ts rename to src/appPages/common/styles/border.ts diff --git a/src/app/common/utils/__tests__/validateUrl.test.ts b/src/appPages/common/utils/__tests__/validateUrl.test.ts similarity index 100% rename from src/app/common/utils/__tests__/validateUrl.test.ts rename to src/appPages/common/utils/__tests__/validateUrl.test.ts diff --git a/src/app/common/utils/buildUrl.ts b/src/appPages/common/utils/buildUrl.ts similarity index 100% rename from src/app/common/utils/buildUrl.ts rename to src/appPages/common/utils/buildUrl.ts diff --git a/src/app/common/utils/head.ts b/src/appPages/common/utils/head.ts similarity index 100% rename from src/app/common/utils/head.ts rename to src/appPages/common/utils/head.ts diff --git a/src/app/common/utils/sandbox.ts b/src/appPages/common/utils/sandbox.ts similarity index 100% rename from src/app/common/utils/sandbox.ts rename to src/appPages/common/utils/sandbox.ts diff --git a/src/app/common/utils/validateUrl.ts b/src/appPages/common/utils/validateUrl.ts similarity index 100% rename from src/app/common/utils/validateUrl.ts rename to src/appPages/common/utils/validateUrl.ts diff --git a/src/app/components/BlockList/AnimatedBlockAndMicroblocksItem.tsx b/src/appPages/components/BlockList/AnimatedBlockAndMicroblocksItem.tsx similarity index 94% rename from src/app/components/BlockList/AnimatedBlockAndMicroblocksItem.tsx rename to src/appPages/components/BlockList/AnimatedBlockAndMicroblocksItem.tsx index a1c2e1093..40441e71f 100644 --- a/src/app/components/BlockList/AnimatedBlockAndMicroblocksItem.tsx +++ b/src/appPages/components/BlockList/AnimatedBlockAndMicroblocksItem.tsx @@ -1,7 +1,7 @@ import { FC, memo, useEffect, useState } from 'react'; import { BlockAndMicroblocksItem } from './BlockAndMicroblocksItem'; import { Collapse } from '@/ui/components'; -import { EnhancedBlock } from '@/app/components/BlockList/types'; +import { EnhancedBlock } from '@/appPages/components/BlockList/types'; export const animationDuration = 0.25; diff --git a/src/app/components/BlockList/BlockAndMicroblocksItem.tsx b/src/appPages/components/BlockList/BlockAndMicroblocksItem.tsx similarity index 95% rename from src/app/components/BlockList/BlockAndMicroblocksItem.tsx rename to src/appPages/components/BlockList/BlockAndMicroblocksItem.tsx index 7e94c572a..bddcc6894 100644 --- a/src/app/components/BlockList/BlockAndMicroblocksItem.tsx +++ b/src/appPages/components/BlockList/BlockAndMicroblocksItem.tsx @@ -3,7 +3,7 @@ import { Flex } from '@/ui/Flex'; import { AccordionButton } from '@/ui/AccordionButton'; import { AccordionIcon } from '@/ui/AccordionIcon'; import { AccordionPanel } from '@/ui/AccordionPanel'; -import { useVerticallyStackedElementsBorderStyle } from '@/app/common/styles/border'; +import { useVerticallyStackedElementsBorderStyle } from '@/appPages/common/styles/border'; import { MicroblockListItem } from './MicroblockListItem'; import { Text } from '@/ui/Text'; import React, { memo } from 'react'; diff --git a/src/app/components/BlockList/BlockListItem.tsx b/src/appPages/components/BlockList/BlockListItem.tsx similarity index 100% rename from src/app/components/BlockList/BlockListItem.tsx rename to src/appPages/components/BlockList/BlockListItem.tsx diff --git a/src/app/components/BlockList/MicroblockListItem.tsx b/src/appPages/components/BlockList/MicroblockListItem.tsx similarity index 100% rename from src/app/components/BlockList/MicroblockListItem.tsx rename to src/appPages/components/BlockList/MicroblockListItem.tsx diff --git a/src/app/components/BlockList/__tests__/BlocksListBase.test.tsx b/src/appPages/components/BlockList/__tests__/BlocksListBase.test.tsx similarity index 97% rename from src/app/components/BlockList/__tests__/BlocksListBase.test.tsx rename to src/appPages/components/BlockList/__tests__/BlocksListBase.test.tsx index fcfc41d21..a450a98a1 100644 --- a/src/app/components/BlockList/__tests__/BlocksListBase.test.tsx +++ b/src/appPages/components/BlockList/__tests__/BlocksListBase.test.tsx @@ -1,12 +1,12 @@ import React from 'react'; import { render, screen, fireEvent, waitFor, act } from '@testing-library/react'; import BlocksListBase from '../'; -import { useBlockListInfinite as useBlockListInfiniteActual } from '@/app/common/queries/useBlockListInfinite'; +import { useBlockListInfinite as useBlockListInfiniteActual } from '@/appPages/common/queries/useBlockListInfinite'; import { connectWebSocketClient as connectWebSocketClientActual } from '@stacks/blockchain-api-client'; import { Block } from '@stacks/stacks-blockchain-api-types'; import { StacksApiWebSocketClient } from '@stacks/blockchain-api-client'; -import { EnhancedBlock } from '@/app/components/BlockList/types'; +import { EnhancedBlock } from '@/appPages/components/BlockList/types'; const useBlockListInfinite = useBlockListInfiniteActual as jest.MockedFunction< typeof useBlockListInfiniteActual diff --git a/src/app/components/BlockList/__tests__/MicroblockListItem.test.tsx b/src/appPages/components/BlockList/__tests__/MicroblockListItem.test.tsx similarity index 100% rename from src/app/components/BlockList/__tests__/MicroblockListItem.test.tsx rename to src/appPages/components/BlockList/__tests__/MicroblockListItem.test.tsx diff --git a/src/app/components/BlockList/__tests__/__snapshots__/MicroblockListItem.test.tsx.snap b/src/appPages/components/BlockList/__tests__/__snapshots__/MicroblockListItem.test.tsx.snap similarity index 100% rename from src/app/components/BlockList/__tests__/__snapshots__/MicroblockListItem.test.tsx.snap rename to src/appPages/components/BlockList/__tests__/__snapshots__/MicroblockListItem.test.tsx.snap diff --git a/src/app/components/BlockList/hooks/useBlockList.ts b/src/appPages/components/BlockList/hooks/useBlockList.ts similarity index 100% rename from src/app/components/BlockList/hooks/useBlockList.ts rename to src/appPages/components/BlockList/hooks/useBlockList.ts diff --git a/src/app/components/BlockList/index.tsx b/src/appPages/components/BlockList/index.tsx similarity index 93% rename from src/app/components/BlockList/index.tsx rename to src/appPages/components/BlockList/index.tsx index 18f0f430e..fcf56cc66 100644 --- a/src/app/components/BlockList/index.tsx +++ b/src/appPages/components/BlockList/index.tsx @@ -16,10 +16,10 @@ import { connectWebSocketClient } from '@stacks/blockchain-api-client'; import { useInfiniteQueryResult } from '../../common/hooks/useInfiniteQueryResult'; import { useBlockListInfinite } from '../../common/queries/useBlockListInfinite'; import { useGlobalContext } from '@/common/context/useAppContext'; -import { AnimatedBlockAndMicroblocksItem } from '@/app/components/BlockList/AnimatedBlockAndMicroblocksItem'; -import { EnhancedBlock } from '@/app/components/BlockList/types'; +import { AnimatedBlockAndMicroblocksItem } from '@/appPages/components/BlockList/AnimatedBlockAndMicroblocksItem'; +import { EnhancedBlock } from '@/appPages/components/BlockList/types'; import { DEFAULT_LIST_LIMIT } from '@/common/constants'; -import { BlockAndMicroblocksItem } from '@/app/components/BlockList/BlockAndMicroblocksItem'; +import { BlockAndMicroblocksItem } from '@/appPages/components/BlockList/BlockAndMicroblocksItem'; const BlocksListBase: React.FC<{ limit?: number; diff --git a/src/app/components/BlockList/types.ts b/src/appPages/components/BlockList/types.ts similarity index 100% rename from src/app/components/BlockList/types.ts rename to src/appPages/components/BlockList/types.ts diff --git a/src/app/components/NavBar/DesktopNav.tsx b/src/appPages/components/NavBar/DesktopNav.tsx similarity index 100% rename from src/app/components/NavBar/DesktopNav.tsx rename to src/appPages/components/NavBar/DesktopNav.tsx diff --git a/src/app/components/NavBar/DesktopSubNav.tsx b/src/appPages/components/NavBar/DesktopSubNav.tsx similarity index 100% rename from src/app/components/NavBar/DesktopSubNav.tsx rename to src/appPages/components/NavBar/DesktopSubNav.tsx diff --git a/src/app/components/NavBar/Logo.tsx b/src/appPages/components/NavBar/Logo.tsx similarity index 100% rename from src/app/components/NavBar/Logo.tsx rename to src/appPages/components/NavBar/Logo.tsx diff --git a/src/app/components/NavBar/MobileNav.tsx b/src/appPages/components/NavBar/MobileNav.tsx similarity index 94% rename from src/app/components/NavBar/MobileNav.tsx rename to src/appPages/components/NavBar/MobileNav.tsx index 19045cce8..a910db160 100644 --- a/src/app/components/NavBar/MobileNav.tsx +++ b/src/appPages/components/NavBar/MobileNav.tsx @@ -1,6 +1,6 @@ import { Stack } from '@/ui/Stack'; import React, { FC } from 'react'; -import { MobileNavItem } from '@/app/components/NavBar/MobileNavItem'; +import { MobileNavItem } from '@/appPages/components/NavBar/MobileNavItem'; import { NavItem } from './types'; import { useColorMode } from '@chakra-ui/react'; import { TbX } from 'react-icons/tb'; diff --git a/src/app/components/NavBar/MobileNavItem.tsx b/src/appPages/components/NavBar/MobileNavItem.tsx similarity index 100% rename from src/app/components/NavBar/MobileNavItem.tsx rename to src/appPages/components/NavBar/MobileNavItem.tsx diff --git a/src/app/components/NavBar/NavLabel.tsx b/src/appPages/components/NavBar/NavLabel.tsx similarity index 100% rename from src/app/components/NavBar/NavLabel.tsx rename to src/appPages/components/NavBar/NavLabel.tsx diff --git a/src/app/components/NavBar/NetworkLabel.tsx b/src/appPages/components/NavBar/NetworkLabel.tsx similarity index 94% rename from src/app/components/NavBar/NetworkLabel.tsx rename to src/appPages/components/NavBar/NetworkLabel.tsx index 3d56f122b..86277a485 100644 --- a/src/app/components/NavBar/NetworkLabel.tsx +++ b/src/appPages/components/NavBar/NetworkLabel.tsx @@ -4,9 +4,9 @@ import { useColorMode } from '@chakra-ui/react'; import { ChainID } from '@stacks/transactions'; import { useQuery } from '@tanstack/react-query'; import { CoreNodeInfoResponse } from '@stacks/blockchain-api-client/src/generated/models'; -import { ONE_MINUTE } from '@/app/common/queries/query-stale-time'; +import { ONE_MINUTE } from '@/appPages/common/queries/query-stale-time'; import { getNetworkModeFromNetworkId } from '@/common/api/utils'; -import { getCustomNetworkApiInfo } from '@/app/components/NavBar/getCustomNetworkApiInfo'; +import { getCustomNetworkApiInfo } from '@/appPages/components/NavBar/getCustomNetworkApiInfo'; import { Flex } from '@/ui/Flex'; import { Caption, Title } from '@/ui/typography'; import { Badge } from '@/common/components/Badge'; @@ -17,7 +17,7 @@ import { IconButton } from '@/ui/IconButton'; import { TbCheck, TbTrash } from 'react-icons/tb'; import { Spinner } from '@/ui/Spinner'; import { Box } from '@/ui/Box'; -import { buildUrl } from '@/app/common/utils/buildUrl'; +import { buildUrl } from '@/appPages/common/utils/buildUrl'; import { DEFAULT_DEVNET_SERVER } from '@/common/constants'; export const NetworkLabel: FC<{ network: Network }> = ({ network }) => { diff --git a/src/app/components/NavBar/__tests__/DesktopNav.test.tsx b/src/appPages/components/NavBar/__tests__/DesktopNav.test.tsx similarity index 100% rename from src/app/components/NavBar/__tests__/DesktopNav.test.tsx rename to src/appPages/components/NavBar/__tests__/DesktopNav.test.tsx diff --git a/src/app/components/NavBar/__tests__/MobileNav.test.tsx b/src/appPages/components/NavBar/__tests__/MobileNav.test.tsx similarity index 100% rename from src/app/components/NavBar/__tests__/MobileNav.test.tsx rename to src/appPages/components/NavBar/__tests__/MobileNav.test.tsx diff --git a/src/app/components/NavBar/__tests__/NetworkLabel.test.tsx b/src/appPages/components/NavBar/__tests__/NetworkLabel.test.tsx similarity index 100% rename from src/app/components/NavBar/__tests__/NetworkLabel.test.tsx rename to src/appPages/components/NavBar/__tests__/NetworkLabel.test.tsx diff --git a/src/app/components/NavBar/__tests__/__snapshots__/DesktopNav.test.tsx.snap b/src/appPages/components/NavBar/__tests__/__snapshots__/DesktopNav.test.tsx.snap similarity index 100% rename from src/app/components/NavBar/__tests__/__snapshots__/DesktopNav.test.tsx.snap rename to src/appPages/components/NavBar/__tests__/__snapshots__/DesktopNav.test.tsx.snap diff --git a/src/app/components/NavBar/__tests__/__snapshots__/MobileNav.test.tsx.snap b/src/appPages/components/NavBar/__tests__/__snapshots__/MobileNav.test.tsx.snap similarity index 100% rename from src/app/components/NavBar/__tests__/__snapshots__/MobileNav.test.tsx.snap rename to src/appPages/components/NavBar/__tests__/__snapshots__/MobileNav.test.tsx.snap diff --git a/src/app/components/NavBar/getCustomNetworkApiInfo.ts b/src/appPages/components/NavBar/getCustomNetworkApiInfo.ts similarity index 100% rename from src/app/components/NavBar/getCustomNetworkApiInfo.ts rename to src/appPages/components/NavBar/getCustomNetworkApiInfo.ts diff --git a/src/app/components/NavBar/index.tsx b/src/appPages/components/NavBar/index.tsx similarity index 90% rename from src/app/components/NavBar/index.tsx rename to src/appPages/components/NavBar/index.tsx index 6b3e7819c..ffd27d448 100644 --- a/src/app/components/NavBar/index.tsx +++ b/src/appPages/components/NavBar/index.tsx @@ -7,9 +7,9 @@ import { useDisclosure } from '@/ui/hooks/useDisclosure'; import { FC, useMemo } from 'react'; import { Logo } from './Logo'; import { SearchComponent } from '@/features/search/search'; -import { DesktopNav } from '@/app/components/NavBar/DesktopNav'; -import { NavItem } from '@/app/components/NavBar/types'; -import { buildUrl } from '@/app/common/utils/buildUrl'; +import { DesktopNav } from '@/appPages/components/NavBar/DesktopNav'; +import { NavItem } from '@/appPages/components/NavBar/types'; +import { buildUrl } from '@/appPages/common/utils/buildUrl'; import { useGlobalContext } from '@/common/context/useAppContext'; import { NetworkModeBanner } from '@/components/network-mode-banner'; import { BtcStxPrice } from '@/components/btc-stx-price'; @@ -19,9 +19,9 @@ import { openModal } from '@/components/modals/modal-slice'; import { useAppDispatch } from '@/common/state/hooks'; import { Network } from '@/common/types/network'; import { useColorMode } from '@chakra-ui/react'; -import { NetworkLabel } from '@/app/components/NavBar/NetworkLabel'; -import { NavLabel } from '@/app/components/NavBar/NavLabel'; -import { MobileNav } from '@/app/components/NavBar/MobileNav'; +import { NetworkLabel } from '@/appPages/components/NavBar/NetworkLabel'; +import { NavLabel } from '@/appPages/components/NavBar/NavLabel'; +import { MobileNav } from '@/appPages/components/NavBar/MobileNav'; export const NavBar: FC = () => { const { isOpen, onToggle } = useDisclosure(); diff --git a/src/app/components/NavBar/types.ts b/src/appPages/components/NavBar/types.ts similarity index 100% rename from src/app/components/NavBar/types.ts rename to src/appPages/components/NavBar/types.ts diff --git a/src/app/error.tsx b/src/appPages/error.tsx similarity index 100% rename from src/app/error.tsx rename to src/appPages/error.tsx diff --git a/src/app/head.tsx b/src/appPages/head.tsx similarity index 100% rename from src/app/head.tsx rename to src/appPages/head.tsx diff --git a/src/appPages/layout.tsx b/src/appPages/layout.tsx new file mode 100644 index 000000000..5e21e9d95 --- /dev/null +++ b/src/appPages/layout.tsx @@ -0,0 +1,26 @@ +import { PageWrapper } from '@/appPages/PageWrapper'; +import { cookies } from 'next/headers'; + +import { Providers } from './Providers'; +import './global-style/code-editor.css'; +import './global-style/global.css'; +import './global-style/prism-theme.css'; + +const colorModeCookieName = 'chakra-ui-color-mode'; + +export default function RootLayout({ children }: any) { + const colorModeCookie = cookies().get(colorModeCookieName) || { + name: colorModeCookieName, + value: 'light', + }; + return ( + + + + + {children} + + + + ); +} diff --git a/src/app/loading.tsx b/src/appPages/loading.tsx similarity index 100% rename from src/app/loading.tsx rename to src/appPages/loading.tsx diff --git a/src/app/microblock/[hash]/error.tsx b/src/appPages/microblock/[hash]/error.tsx similarity index 100% rename from src/app/microblock/[hash]/error.tsx rename to src/appPages/microblock/[hash]/error.tsx diff --git a/src/app/microblock/[hash]/head.tsx b/src/appPages/microblock/[hash]/head.tsx similarity index 100% rename from src/app/microblock/[hash]/head.tsx rename to src/appPages/microblock/[hash]/head.tsx diff --git a/src/app/microblock/[hash]/page.tsx b/src/appPages/microblock/[hash]/page.tsx similarity index 96% rename from src/app/microblock/[hash]/page.tsx rename to src/appPages/microblock/[hash]/page.tsx index ffb1cea1d..57d80b868 100644 --- a/src/app/microblock/[hash]/page.tsx +++ b/src/appPages/microblock/[hash]/page.tsx @@ -1,7 +1,7 @@ 'use client'; -import { PageTitle } from '@/app/common/components/PageTitle'; -import { MicroblockTxsList } from '@/app/microblock/[hash]/tx-lists/MicroblockTxsList'; +import { PageTitle } from '@/appPages/common/components/PageTitle'; +import { MicroblockTxsList } from '@/appPages/microblock/[hash]/tx-lists/MicroblockTxsList'; import { useGlobalContext } from '@/common/context/useAppContext'; import { toRelativeTime, truncateMiddle } from '@/common/utils'; import { SkeletonTransactionList } from '@/components/loaders/skeleton-transaction'; diff --git a/src/app/microblock/[hash]/tx-lists/MicroblockTxsList.tsx b/src/appPages/microblock/[hash]/tx-lists/MicroblockTxsList.tsx similarity index 92% rename from src/app/microblock/[hash]/tx-lists/MicroblockTxsList.tsx rename to src/appPages/microblock/[hash]/tx-lists/MicroblockTxsList.tsx index 24309b095..f19eeff63 100644 --- a/src/app/microblock/[hash]/tx-lists/MicroblockTxsList.tsx +++ b/src/appPages/microblock/[hash]/tx-lists/MicroblockTxsList.tsx @@ -1,5 +1,5 @@ -import { TxIcon } from '@/app/common/components/TxIcon'; -import { useMicroblockByHash } from '@/app/common/queries/useMicroblockByHash'; +import { TxIcon } from '@/appPages/common/components/TxIcon'; +import { useMicroblockByHash } from '@/appPages/common/queries/useMicroblockByHash'; import { useApi } from '@/common/api/client'; import { TwoColsListItem } from '@/common/components/TwoColumnsListItem'; import { truncateMiddle } from '@/common/utils'; diff --git a/src/app/page.tsx b/src/appPages/page.tsx similarity index 83% rename from src/app/page.tsx rename to src/appPages/page.tsx index 23afc7942..6b081cfdf 100644 --- a/src/app/page.tsx +++ b/src/appPages/page.tsx @@ -1,4 +1,4 @@ -import { HomeClient } from '@/app/HomeClient'; +import { HomeClient } from '@/appPages/HomeClient'; import { FC } from 'react'; const Home: FC<{ diff --git a/src/app/sandbox/components/Argument/ListArgumentInput.tsx b/src/appPages/sandbox/components/Argument/ListArgumentInput.tsx similarity index 100% rename from src/app/sandbox/components/Argument/ListArgumentInput.tsx rename to src/appPages/sandbox/components/Argument/ListArgumentInput.tsx diff --git a/src/app/sandbox/components/Argument/PrimitiveArgumentInput.tsx b/src/appPages/sandbox/components/Argument/PrimitiveArgumentInput.tsx similarity index 100% rename from src/app/sandbox/components/Argument/PrimitiveArgumentInput.tsx rename to src/appPages/sandbox/components/Argument/PrimitiveArgumentInput.tsx diff --git a/src/app/sandbox/components/Argument/TupleArgumentInput.tsx b/src/appPages/sandbox/components/Argument/TupleArgumentInput.tsx similarity index 100% rename from src/app/sandbox/components/Argument/TupleArgumentInput.tsx rename to src/appPages/sandbox/components/Argument/TupleArgumentInput.tsx diff --git a/src/app/sandbox/components/Argument/index.tsx b/src/appPages/sandbox/components/Argument/index.tsx similarity index 100% rename from src/app/sandbox/components/Argument/index.tsx rename to src/appPages/sandbox/components/Argument/index.tsx diff --git a/src/app/sandbox/components/Argument/types.ts b/src/appPages/sandbox/components/Argument/types.ts similarity index 100% rename from src/app/sandbox/components/Argument/types.ts rename to src/appPages/sandbox/components/Argument/types.ts diff --git a/src/app/sandbox/components/ClarityIcon.tsx b/src/appPages/sandbox/components/ClarityIcon.tsx similarity index 100% rename from src/app/sandbox/components/ClarityIcon.tsx rename to src/appPages/sandbox/components/ClarityIcon.tsx diff --git a/src/app/sandbox/components/ContractCall/AvailableFunctionsView.tsx b/src/appPages/sandbox/components/ContractCall/AvailableFunctionsView.tsx similarity index 97% rename from src/app/sandbox/components/ContractCall/AvailableFunctionsView.tsx rename to src/appPages/sandbox/components/ContractCall/AvailableFunctionsView.tsx index eb47bba2f..e6492d053 100644 --- a/src/app/sandbox/components/ContractCall/AvailableFunctionsView.tsx +++ b/src/appPages/sandbox/components/ContractCall/AvailableFunctionsView.tsx @@ -1,6 +1,6 @@ 'use client'; -import { showFn } from '@/app/common/utils/sandbox'; +import { showFn } from '@/appPages/common/utils/sandbox'; import { Badge } from '@/common/components/Badge'; import { ContractWithParsedAbi } from '@/common/types/contract'; import { ArrowRightIcon } from '@/components/icons/arrow-right'; diff --git a/src/app/sandbox/components/ContractCall/DefaultView/PopularContracts.tsx b/src/appPages/sandbox/components/ContractCall/DefaultView/PopularContracts.tsx similarity index 100% rename from src/app/sandbox/components/ContractCall/DefaultView/PopularContracts.tsx rename to src/appPages/sandbox/components/ContractCall/DefaultView/PopularContracts.tsx diff --git a/src/app/sandbox/components/ContractCall/DefaultView/SearchContractsForm.tsx b/src/appPages/sandbox/components/ContractCall/DefaultView/SearchContractsForm.tsx similarity index 98% rename from src/app/sandbox/components/ContractCall/DefaultView/SearchContractsForm.tsx rename to src/appPages/sandbox/components/ContractCall/DefaultView/SearchContractsForm.tsx index daf1a43c2..753682f62 100644 --- a/src/app/sandbox/components/ContractCall/DefaultView/SearchContractsForm.tsx +++ b/src/appPages/sandbox/components/ContractCall/DefaultView/SearchContractsForm.tsx @@ -1,6 +1,6 @@ 'use client'; -import { buildUrl } from '@/app/common/utils/buildUrl'; +import { buildUrl } from '@/appPages/common/utils/buildUrl'; import { useGlobalContext } from '@/common/context/useAppContext'; import { onPaste, validateStacksAddress } from '@/common/utils'; import { Box, Button, Flex, Input, Stack, TextLink } from '@/ui/components'; diff --git a/src/app/sandbox/components/ContractCall/DefaultView/index.tsx b/src/appPages/sandbox/components/ContractCall/DefaultView/index.tsx similarity index 100% rename from src/app/sandbox/components/ContractCall/DefaultView/index.tsx rename to src/appPages/sandbox/components/ContractCall/DefaultView/index.tsx diff --git a/src/app/sandbox/components/ContractCall/FunctionView.tsx b/src/appPages/sandbox/components/ContractCall/FunctionView.tsx similarity index 99% rename from src/app/sandbox/components/ContractCall/FunctionView.tsx rename to src/appPages/sandbox/components/ContractCall/FunctionView.tsx index aa7bc6bc1..17f52ed3f 100644 --- a/src/app/sandbox/components/ContractCall/FunctionView.tsx +++ b/src/appPages/sandbox/components/ContractCall/FunctionView.tsx @@ -1,6 +1,6 @@ 'use client'; -import { showFn } from '@/app/common/utils/sandbox'; +import { showFn } from '@/appPages/common/utils/sandbox'; import { CONNECT_AUTH_ORIGIN } from '@/common/constants'; import { validateStacksAddress } from '@/common/utils'; import { Section } from '@/components/section'; diff --git a/src/app/sandbox/components/ContractCall/ReadOnlyField.tsx b/src/appPages/sandbox/components/ContractCall/ReadOnlyField.tsx similarity index 100% rename from src/app/sandbox/components/ContractCall/ReadOnlyField.tsx rename to src/appPages/sandbox/components/ContractCall/ReadOnlyField.tsx diff --git a/src/app/sandbox/components/ContractCall/SelectedContractView.tsx b/src/appPages/sandbox/components/ContractCall/SelectedContractView.tsx similarity index 98% rename from src/app/sandbox/components/ContractCall/SelectedContractView.tsx rename to src/appPages/sandbox/components/ContractCall/SelectedContractView.tsx index b73a20254..92038f5b9 100644 --- a/src/app/sandbox/components/ContractCall/SelectedContractView.tsx +++ b/src/appPages/sandbox/components/ContractCall/SelectedContractView.tsx @@ -1,6 +1,6 @@ 'use client'; -import { buildUrl } from '@/app/common/utils/buildUrl'; +import { buildUrl } from '@/appPages/common/utils/buildUrl'; import { useGlobalContext } from '@/common/context/useAppContext'; import { useAppSelector } from '@/common/state/hooks'; import { ContractWithParsedAbi } from '@/common/types/contract'; diff --git a/src/app/sandbox/components/Toolbar.tsx b/src/appPages/sandbox/components/Toolbar.tsx similarity index 100% rename from src/app/sandbox/components/Toolbar.tsx rename to src/appPages/sandbox/components/Toolbar.tsx diff --git a/src/app/sandbox/components/TransactionsPanel.tsx b/src/appPages/sandbox/components/TransactionsPanel.tsx similarity index 99% rename from src/app/sandbox/components/TransactionsPanel.tsx rename to src/appPages/sandbox/components/TransactionsPanel.tsx index 3d6910921..87bf9f558 100644 --- a/src/app/sandbox/components/TransactionsPanel.tsx +++ b/src/appPages/sandbox/components/TransactionsPanel.tsx @@ -1,6 +1,6 @@ 'use client'; -import { buildUrl } from '@/app/common/utils/buildUrl'; +import { buildUrl } from '@/appPages/common/utils/buildUrl'; import { Badge } from '@/common/components/Badge'; import { useGlobalContext } from '@/common/context/useAppContext'; import { useAppDispatch } from '@/common/state/hooks'; diff --git a/src/app/sandbox/contract-call/[[...params]]/page.tsx b/src/appPages/sandbox/contract-call/[[...params]]/page.tsx similarity index 100% rename from src/app/sandbox/contract-call/[[...params]]/page.tsx rename to src/appPages/sandbox/contract-call/[[...params]]/page.tsx diff --git a/src/app/sandbox/deploy/DeployPage.tsx b/src/appPages/sandbox/deploy/DeployPage.tsx similarity index 100% rename from src/app/sandbox/deploy/DeployPage.tsx rename to src/appPages/sandbox/deploy/DeployPage.tsx diff --git a/src/app/sandbox/deploy/LeftSection.tsx b/src/appPages/sandbox/deploy/LeftSection.tsx similarity index 100% rename from src/app/sandbox/deploy/LeftSection.tsx rename to src/appPages/sandbox/deploy/LeftSection.tsx diff --git a/src/app/sandbox/deploy/RightSection.tsx b/src/appPages/sandbox/deploy/RightSection.tsx similarity index 100% rename from src/app/sandbox/deploy/RightSection.tsx rename to src/appPages/sandbox/deploy/RightSection.tsx diff --git a/src/app/sandbox/deploy/page.tsx b/src/appPages/sandbox/deploy/page.tsx similarity index 100% rename from src/app/sandbox/deploy/page.tsx rename to src/appPages/sandbox/deploy/page.tsx diff --git a/src/app/sandbox/editor-config/autocomplete.ts b/src/appPages/sandbox/editor-config/autocomplete.ts similarity index 100% rename from src/app/sandbox/editor-config/autocomplete.ts rename to src/appPages/sandbox/editor-config/autocomplete.ts diff --git a/src/app/sandbox/editor-config/clarity-reference.ts b/src/appPages/sandbox/editor-config/clarity-reference.ts similarity index 100% rename from src/app/sandbox/editor-config/clarity-reference.ts rename to src/appPages/sandbox/editor-config/clarity-reference.ts diff --git a/src/app/sandbox/editor-config/define-theme.ts b/src/appPages/sandbox/editor-config/define-theme.ts similarity index 100% rename from src/app/sandbox/editor-config/define-theme.ts rename to src/appPages/sandbox/editor-config/define-theme.ts diff --git a/src/app/sandbox/editor-config/init.ts b/src/appPages/sandbox/editor-config/init.ts similarity index 100% rename from src/app/sandbox/editor-config/init.ts rename to src/appPages/sandbox/editor-config/init.ts diff --git a/src/app/sandbox/editor-config/language.ts b/src/appPages/sandbox/editor-config/language.ts similarity index 100% rename from src/app/sandbox/editor-config/language.ts rename to src/appPages/sandbox/editor-config/language.ts diff --git a/src/app/sandbox/faucet/page.tsx b/src/appPages/sandbox/faucet/page.tsx similarity index 100% rename from src/app/sandbox/faucet/page.tsx rename to src/appPages/sandbox/faucet/page.tsx diff --git a/src/app/sandbox/head.tsx b/src/appPages/sandbox/head.tsx similarity index 100% rename from src/app/sandbox/head.tsx rename to src/appPages/sandbox/head.tsx diff --git a/src/app/sandbox/hooks/useUser.ts b/src/appPages/sandbox/hooks/useUser.ts similarity index 100% rename from src/app/sandbox/hooks/useUser.ts rename to src/appPages/sandbox/hooks/useUser.ts diff --git a/src/app/sandbox/layout.tsx b/src/appPages/sandbox/layout.tsx similarity index 95% rename from src/app/sandbox/layout.tsx rename to src/appPages/sandbox/layout.tsx index bacdad023..8b5961542 100644 --- a/src/app/sandbox/layout.tsx +++ b/src/appPages/sandbox/layout.tsx @@ -1,6 +1,6 @@ 'use client'; -import { getQueryParams } from '@/app/common/utils/buildUrl'; +import { getQueryParams } from '@/appPages/common/utils/buildUrl'; import { useGlobalContext } from '@/common/context/useAppContext'; import { useAppSelector } from '@/common/state/hooks'; import { Flex, Grid } from '@/ui/components'; diff --git a/src/app/sandbox/layout/ConnectToStacks.tsx b/src/appPages/sandbox/layout/ConnectToStacks.tsx similarity index 100% rename from src/app/sandbox/layout/ConnectToStacks.tsx rename to src/appPages/sandbox/layout/ConnectToStacks.tsx diff --git a/src/app/sandbox/layout/Header.tsx b/src/appPages/sandbox/layout/Header.tsx similarity index 100% rename from src/app/sandbox/layout/Header.tsx rename to src/appPages/sandbox/layout/Header.tsx diff --git a/src/app/sandbox/layout/NavItem.tsx b/src/appPages/sandbox/layout/NavItem.tsx similarity index 100% rename from src/app/sandbox/layout/NavItem.tsx rename to src/appPages/sandbox/layout/NavItem.tsx diff --git a/src/app/sandbox/layout/RightPanel.tsx b/src/appPages/sandbox/layout/RightPanel.tsx similarity index 97% rename from src/app/sandbox/layout/RightPanel.tsx rename to src/appPages/sandbox/layout/RightPanel.tsx index 74b5e8ddc..bdd936e36 100644 --- a/src/app/sandbox/layout/RightPanel.tsx +++ b/src/appPages/sandbox/layout/RightPanel.tsx @@ -1,4 +1,4 @@ -import { SkeletonRightPanel } from '@/app/sandbox/layout/SkeletonRightPanel'; +import { SkeletonRightPanel } from '@/appPages/sandbox/layout/SkeletonRightPanel'; import { useAppSelector } from '@/common/state/hooks'; import { microToStacks, truncateMiddle } from '@/common/utils'; import { Box } from '@/ui/Box'; diff --git a/src/app/sandbox/layout/SideNav.tsx b/src/appPages/sandbox/layout/SideNav.tsx similarity index 96% rename from src/app/sandbox/layout/SideNav.tsx rename to src/appPages/sandbox/layout/SideNav.tsx index 4b5db3e5a..29a87e2f4 100644 --- a/src/app/sandbox/layout/SideNav.tsx +++ b/src/appPages/sandbox/layout/SideNav.tsx @@ -1,6 +1,6 @@ 'use client'; -import { buildUrl } from '@/app/common/utils/buildUrl'; +import { buildUrl } from '@/appPages/common/utils/buildUrl'; import { useGlobalContext } from '@/common/context/useAppContext'; import { DropIcon } from '@/components/icons/drop'; import { Icon, Stack, StackProps } from '@/ui/components'; diff --git a/src/app/sandbox/layout/SkeletonRightPanel.tsx b/src/appPages/sandbox/layout/SkeletonRightPanel.tsx similarity index 96% rename from src/app/sandbox/layout/SkeletonRightPanel.tsx rename to src/appPages/sandbox/layout/SkeletonRightPanel.tsx index 063ac0c69..3686c5288 100644 --- a/src/app/sandbox/layout/SkeletonRightPanel.tsx +++ b/src/appPages/sandbox/layout/SkeletonRightPanel.tsx @@ -1,4 +1,4 @@ -import { useVerticallyStackedElementsBorderStyle } from '@/app/common/styles/border'; +import { useVerticallyStackedElementsBorderStyle } from '@/appPages/common/styles/border'; import { ExplorerSkeletonLoader } from '@/components/loaders/skeleton-common'; import { SkeletonTxListItemMini } from '@/components/loaders/skeleton-transaction'; import { Box } from '@/ui/Box'; diff --git a/src/app/sandbox/sandbox-slice.ts b/src/appPages/sandbox/sandbox-slice.ts similarity index 100% rename from src/app/sandbox/sandbox-slice.ts rename to src/appPages/sandbox/sandbox-slice.ts diff --git a/src/app/sandbox/transfer/page.tsx b/src/appPages/sandbox/transfer/page.tsx similarity index 100% rename from src/app/sandbox/transfer/page.tsx rename to src/appPages/sandbox/transfer/page.tsx diff --git a/src/app/sandbox/types/values.ts b/src/appPages/sandbox/types/values.ts similarity index 100% rename from src/app/sandbox/types/values.ts rename to src/appPages/sandbox/types/values.ts diff --git a/src/app/sandbox/utils.ts b/src/appPages/sandbox/utils.ts similarity index 100% rename from src/app/sandbox/utils.ts rename to src/appPages/sandbox/utils.ts diff --git a/src/app/stats/CurrentStackingCycle/index.tsx b/src/appPages/stats/CurrentStackingCycle/index.tsx similarity index 95% rename from src/app/stats/CurrentStackingCycle/index.tsx rename to src/appPages/stats/CurrentStackingCycle/index.tsx index 6ad91cac5..59c9ec666 100644 --- a/src/app/stats/CurrentStackingCycle/index.tsx +++ b/src/appPages/stats/CurrentStackingCycle/index.tsx @@ -1,4 +1,4 @@ -import { SkeletonStatSection } from '@/app/stats/SkeletonStatSection'; +import { SkeletonStatSection } from '@/appPages/stats/SkeletonStatSection'; import { InfoCircleIcon } from '@/components/icons/info-circle'; import { Flex, GridProps, Tooltip } from '@/ui/components'; import { Text } from '@/ui/typography'; diff --git a/src/app/stats/CurrentStackingCycle/useCurrentStackingCycle.ts b/src/appPages/stats/CurrentStackingCycle/useCurrentStackingCycle.ts similarity index 100% rename from src/app/stats/CurrentStackingCycle/useCurrentStackingCycle.ts rename to src/appPages/stats/CurrentStackingCycle/useCurrentStackingCycle.ts diff --git a/src/app/stats/LastBlock/index.tsx b/src/appPages/stats/LastBlock/index.tsx similarity index 100% rename from src/app/stats/LastBlock/index.tsx rename to src/appPages/stats/LastBlock/index.tsx diff --git a/src/app/stats/NextStackingCycle/index.tsx b/src/appPages/stats/NextStackingCycle/index.tsx similarity index 97% rename from src/app/stats/NextStackingCycle/index.tsx rename to src/appPages/stats/NextStackingCycle/index.tsx index e988dd70a..0cd0dca1f 100644 --- a/src/app/stats/NextStackingCycle/index.tsx +++ b/src/appPages/stats/NextStackingCycle/index.tsx @@ -1,4 +1,4 @@ -import { SkeletonStatSection } from '@/app/stats/SkeletonStatSection'; +import { SkeletonStatSection } from '@/appPages/stats/SkeletonStatSection'; import { InfoCircleIcon } from '@/components/icons/info-circle'; import { Flex, GridProps, Tooltip } from '@/ui/components'; import { Text } from '@/ui/typography'; diff --git a/src/app/stats/NextStackingCycle/useNextStackingCycle.ts b/src/appPages/stats/NextStackingCycle/useNextStackingCycle.ts similarity index 100% rename from src/app/stats/NextStackingCycle/useNextStackingCycle.ts rename to src/appPages/stats/NextStackingCycle/useNextStackingCycle.ts diff --git a/src/app/stats/SkeletonStatSection.tsx b/src/appPages/stats/SkeletonStatSection.tsx similarity index 100% rename from src/app/stats/SkeletonStatSection.tsx rename to src/appPages/stats/SkeletonStatSection.tsx diff --git a/src/app/stats/StackingCycle.tsx b/src/appPages/stats/StackingCycle.tsx similarity index 100% rename from src/app/stats/StackingCycle.tsx rename to src/appPages/stats/StackingCycle.tsx diff --git a/src/app/stats/StatSection.tsx b/src/appPages/stats/StatSection.tsx similarity index 100% rename from src/app/stats/StatSection.tsx rename to src/appPages/stats/StatSection.tsx diff --git a/src/app/stats/Stats.tsx b/src/appPages/stats/Stats.tsx similarity index 100% rename from src/app/stats/Stats.tsx rename to src/appPages/stats/Stats.tsx diff --git a/src/app/stats/StxSupply/index.tsx b/src/appPages/stats/StxSupply/index.tsx similarity index 100% rename from src/app/stats/StxSupply/index.tsx rename to src/appPages/stats/StxSupply/index.tsx diff --git a/src/app/stats/StxSupply/useStxSupply.ts b/src/appPages/stats/StxSupply/useStxSupply.ts similarity index 100% rename from src/app/stats/StxSupply/useStxSupply.ts rename to src/appPages/stats/StxSupply/useStxSupply.ts diff --git a/src/app/token/[tokenId]/LinksGroup.tsx b/src/appPages/token/[tokenId]/LinksGroup.tsx similarity index 90% rename from src/app/token/[tokenId]/LinksGroup.tsx rename to src/appPages/token/[tokenId]/LinksGroup.tsx index b9a4af221..705e64612 100644 --- a/src/app/token/[tokenId]/LinksGroup.tsx +++ b/src/appPages/token/[tokenId]/LinksGroup.tsx @@ -3,7 +3,7 @@ import { MenuItem } from '@/ui/MenuItem'; import { TextLink } from '@/ui/TextLink'; import { Icon } from '@/ui/Icon'; import { Text } from '@/ui/Text'; -import { getLinkIcon, getUrlName, isExplorerLink } from '@/app/token/[tokenId]/utils'; +import { getLinkIcon, getUrlName, isExplorerLink } from '@/appPages/token/[tokenId]/utils'; export const LinksGroup = ({ title, links }: { title: string; links: string[] }) => { if (!links.length) return null; diff --git a/src/app/token/[tokenId]/LinksMenu.tsx b/src/appPages/token/[tokenId]/LinksMenu.tsx similarity index 96% rename from src/app/token/[tokenId]/LinksMenu.tsx rename to src/appPages/token/[tokenId]/LinksMenu.tsx index d472af494..1c8c9bc70 100644 --- a/src/app/token/[tokenId]/LinksMenu.tsx +++ b/src/appPages/token/[tokenId]/LinksMenu.tsx @@ -7,7 +7,7 @@ import { Icon } from '@/ui/Icon'; import { BsChevronDown } from 'react-icons/bs'; import { MenuList } from '@/ui/MenuList'; import React from 'react'; -import { LinksGroup } from '@/app/token/[tokenId]/LinksGroup'; +import { LinksGroup } from '@/appPages/token/[tokenId]/LinksGroup'; import { MenuDivider } from '@/ui/MenuDivider'; export function LinksMenu(props: { links: TokenInfoProps['extended']['links'] }) { diff --git a/src/app/token/[tokenId]/Tabs/DeveloperStat.tsx b/src/appPages/token/[tokenId]/Tabs/DeveloperStat.tsx similarity index 100% rename from src/app/token/[tokenId]/Tabs/DeveloperStat.tsx rename to src/appPages/token/[tokenId]/Tabs/DeveloperStat.tsx diff --git a/src/app/token/[tokenId]/Tabs/Developers.tsx b/src/appPages/token/[tokenId]/Tabs/Developers.tsx similarity index 100% rename from src/app/token/[tokenId]/Tabs/Developers.tsx rename to src/appPages/token/[tokenId]/Tabs/Developers.tsx diff --git a/src/app/token/[tokenId]/Tabs/index.tsx b/src/appPages/token/[tokenId]/Tabs/index.tsx similarity index 72% rename from src/app/token/[tokenId]/Tabs/index.tsx rename to src/appPages/token/[tokenId]/Tabs/index.tsx index b681e9e31..241ad1b7d 100644 --- a/src/app/token/[tokenId]/Tabs/index.tsx +++ b/src/appPages/token/[tokenId]/Tabs/index.tsx @@ -2,16 +2,16 @@ import { TabsProps } from '@/ui/Tabs'; import { FC } from 'react'; -import { TabsContainer } from '@/app/common/components/TabsContainer'; -import { AddressConfirmedTxsList } from '@/app/common/components/tx-lists/address-lists/AddressConfirmedTxsList'; -import { AddressMempoolTxsList } from '@/app/common/components/tx-lists/address-lists/AddressMempoolTxsList'; +import { TabsContainer } from '@/appPages/common/components/TabsContainer'; +import { AddressConfirmedTxsList } from '@/appPages/common/components/tx-lists/address-lists/AddressConfirmedTxsList'; +import { AddressMempoolTxsList } from '@/appPages/common/components/tx-lists/address-lists/AddressMempoolTxsList'; import { useApi } from '@/common/api/client'; -import { useContractById } from '@/app/common/queries/useContractById'; -import { claritySyntax } from '@/app/common/claritySyntax'; +import { useContractById } from '@/appPages/common/queries/useContractById'; +import { claritySyntax } from '@/appPages/common/claritySyntax'; import { CodeEditor } from '@/ui/CodeEditor'; -import { ContractAvailableFunctions } from '@/app/common/components/ContractAvailableFunctions'; +import { ContractAvailableFunctions } from '@/appPages/common/components/ContractAvailableFunctions'; import { TokenInfoProps } from '@/pages/token/[tokenId]'; -import { Developers } from '@/app/token/[tokenId]/Tabs/Developers'; +import { Developers } from '@/appPages/token/[tokenId]/Tabs/Developers'; export const Tabs: FC< { diff --git a/src/app/token/[tokenId]/TokenInfo/MarketCap.tsx b/src/appPages/token/[tokenId]/TokenInfo/MarketCap.tsx similarity index 88% rename from src/app/token/[tokenId]/TokenInfo/MarketCap.tsx rename to src/appPages/token/[tokenId]/TokenInfo/MarketCap.tsx index 1f888c97b..63a19020b 100644 --- a/src/app/token/[tokenId]/TokenInfo/MarketCap.tsx +++ b/src/appPages/token/[tokenId]/TokenInfo/MarketCap.tsx @@ -1,9 +1,9 @@ import { Flex, GridProps } from '@/ui/components'; import { FC } from 'react'; -import { TrendArrow } from '@/app/token/[tokenId]/TokenInfo/TrendArrow'; +import { TrendArrow } from '@/appPages/token/[tokenId]/TokenInfo/TrendArrow'; import { numberToString } from '@/common/utils'; -import { StatSection } from '@/app/stats/StatSection'; +import { StatSection } from '@/appPages/stats/StatSection'; export const MarketCap: FC< GridProps & { diff --git a/src/app/token/[tokenId]/TokenInfo/Price.tsx b/src/appPages/token/[tokenId]/TokenInfo/Price.tsx similarity index 90% rename from src/app/token/[tokenId]/TokenInfo/Price.tsx rename to src/appPages/token/[tokenId]/TokenInfo/Price.tsx index 8bb84b362..e9597d44e 100644 --- a/src/app/token/[tokenId]/TokenInfo/Price.tsx +++ b/src/appPages/token/[tokenId]/TokenInfo/Price.tsx @@ -1,8 +1,8 @@ import { Flex, GridProps } from '@/ui/components'; import { FC } from 'react'; import { useColorMode } from '@chakra-ui/react'; -import { TrendArrow } from '@/app/token/[tokenId]/TokenInfo/TrendArrow'; -import { StatSection } from '@/app/stats/StatSection'; +import { TrendArrow } from '@/appPages/token/[tokenId]/TokenInfo/TrendArrow'; +import { StatSection } from '@/appPages/stats/StatSection'; export const Price: FC< GridProps & { diff --git a/src/app/token/[tokenId]/TokenInfo/Supply.tsx b/src/appPages/token/[tokenId]/TokenInfo/Supply.tsx similarity index 92% rename from src/app/token/[tokenId]/TokenInfo/Supply.tsx rename to src/appPages/token/[tokenId]/TokenInfo/Supply.tsx index 4f6b14c8a..d22cde669 100644 --- a/src/app/token/[tokenId]/TokenInfo/Supply.tsx +++ b/src/appPages/token/[tokenId]/TokenInfo/Supply.tsx @@ -1,7 +1,7 @@ import { numberToString } from '@/common/utils'; import { Flex, GridProps } from '@/ui/components'; import { FC } from 'react'; -import { StatSection } from '@/app/stats/StatSection'; +import { StatSection } from '@/appPages/stats/StatSection'; export const Supply: FC< GridProps & { circulatingSupply: number | null; totalSupply: number | null } diff --git a/src/app/token/[tokenId]/TokenInfo/Transaction.tsx b/src/appPages/token/[tokenId]/TokenInfo/Transaction.tsx similarity index 94% rename from src/app/token/[tokenId]/TokenInfo/Transaction.tsx rename to src/appPages/token/[tokenId]/TokenInfo/Transaction.tsx index ccdbd6b73..1df4b205f 100644 --- a/src/app/token/[tokenId]/TokenInfo/Transaction.tsx +++ b/src/appPages/token/[tokenId]/TokenInfo/Transaction.tsx @@ -3,7 +3,7 @@ import { FC } from 'react'; import { TxLink } from '@/components/links'; import { useColorMode } from '@chakra-ui/react'; import { numberToString } from '@/common/utils'; -import { StatSection } from '@/app/stats/StatSection'; +import { StatSection } from '@/appPages/stats/StatSection'; export const Transaction: FC = ({ tvl, diff --git a/src/app/token/[tokenId]/TokenInfo/TrendArrow.tsx b/src/appPages/token/[tokenId]/TokenInfo/TrendArrow.tsx similarity index 100% rename from src/app/token/[tokenId]/TokenInfo/TrendArrow.tsx rename to src/appPages/token/[tokenId]/TokenInfo/TrendArrow.tsx diff --git a/src/app/token/[tokenId]/TokenInfo/index.tsx b/src/appPages/token/[tokenId]/TokenInfo/index.tsx similarity index 100% rename from src/app/token/[tokenId]/TokenInfo/index.tsx rename to src/appPages/token/[tokenId]/TokenInfo/index.tsx diff --git a/src/app/token/[tokenId]/__tests__/utils.test.ts b/src/appPages/token/[tokenId]/__tests__/utils.test.ts similarity index 100% rename from src/app/token/[tokenId]/__tests__/utils.test.ts rename to src/appPages/token/[tokenId]/__tests__/utils.test.ts diff --git a/src/app/token/[tokenId]/error.tsx b/src/appPages/token/[tokenId]/error.tsx similarity index 93% rename from src/app/token/[tokenId]/error.tsx rename to src/appPages/token/[tokenId]/error.tsx index 83fcaacdf..b24aecec5 100644 --- a/src/app/token/[tokenId]/error.tsx +++ b/src/appPages/token/[tokenId]/error.tsx @@ -1,7 +1,7 @@ 'use client'; -import { PageTitle } from '@/app/common/components/PageTitle'; -import { buildUrl } from '@/app/common/utils/buildUrl'; +import { PageTitle } from '@/appPages/common/components/PageTitle'; +import { buildUrl } from '@/appPages/common/utils/buildUrl'; import { useGlobalContext } from '@/common/context/useAppContext'; import { MessageWithIcon } from '@/components/message-with-icon'; import { Meta } from '@/components/meta-head'; diff --git a/src/app/token/[tokenId]/head.tsx b/src/appPages/token/[tokenId]/head.tsx similarity index 100% rename from src/app/token/[tokenId]/head.tsx rename to src/appPages/token/[tokenId]/head.tsx diff --git a/src/app/token/[tokenId]/index.tsx b/src/appPages/token/[tokenId]/index.tsx similarity index 93% rename from src/app/token/[tokenId]/index.tsx rename to src/appPages/token/[tokenId]/index.tsx index 2a3bcb214..b0b8b43a0 100644 --- a/src/app/token/[tokenId]/index.tsx +++ b/src/appPages/token/[tokenId]/index.tsx @@ -2,7 +2,7 @@ import dynamic from 'next/dynamic'; import { SkeletonPageWithTagsAndTwoColumns } from '@/components/loaders/skeleton-transaction'; import { useRouter } from 'next/router'; import { ErrorBoundary } from 'react-error-boundary'; -import AppTokenPageError from '@/app/token/[tokenId]/error'; +import AppTokenPageError from '@/appPages/token/[tokenId]/error'; import { TokenInfoProps } from '@/pages/token/[tokenId]'; const renderLoadingComponent = () => ; diff --git a/src/app/token/[tokenId]/page.tsx b/src/appPages/token/[tokenId]/page.tsx similarity index 96% rename from src/app/token/[tokenId]/page.tsx rename to src/appPages/token/[tokenId]/page.tsx index 64464c939..693bb3d16 100644 --- a/src/app/token/[tokenId]/page.tsx +++ b/src/appPages/token/[tokenId]/page.tsx @@ -7,7 +7,7 @@ import { StyledBadge } from '@/components/status'; import { Stack } from '@/ui/Stack'; import { Tabs } from './Tabs'; import React from 'react'; -import { LinksMenu } from '@/app/token/[tokenId]/LinksMenu'; +import { LinksMenu } from '@/appPages/token/[tokenId]/LinksMenu'; function TokenPage({ tokenId, tokenInfo }: { tokenId: string; tokenInfo: TokenInfoProps }) { if (!tokenInfo.basic) throw new Error('Could not find token info'); diff --git a/src/app/token/[tokenId]/utils.ts b/src/appPages/token/[tokenId]/utils.ts similarity index 100% rename from src/app/token/[tokenId]/utils.ts rename to src/appPages/token/[tokenId]/utils.ts diff --git a/src/app/tokens/TokenRow/index.tsx b/src/appPages/tokens/TokenRow/index.tsx similarity index 100% rename from src/app/tokens/TokenRow/index.tsx rename to src/appPages/tokens/TokenRow/index.tsx diff --git a/src/app/tokens/TokenRow/loading.tsx b/src/appPages/tokens/TokenRow/loading.tsx similarity index 100% rename from src/app/tokens/TokenRow/loading.tsx rename to src/appPages/tokens/TokenRow/loading.tsx diff --git a/src/app/tokens/TokensList/TokensList.tsx b/src/appPages/tokens/TokensList/TokensList.tsx similarity index 96% rename from src/app/tokens/TokensList/TokensList.tsx rename to src/appPages/tokens/TokensList/TokensList.tsx index 44d277b3b..a83a5a96f 100644 --- a/src/app/tokens/TokensList/TokensList.tsx +++ b/src/appPages/tokens/TokensList/TokensList.tsx @@ -15,12 +15,12 @@ import { Tr, } from '@/ui/components'; import { Section } from '@/components/section'; -import { TokenRow } from '@/app/tokens/TokenRow'; +import { TokenRow } from '@/appPages/tokens/TokenRow'; import { SectionFooterAction } from '@/components/section-footer-button'; import { TbSearch } from 'react-icons/tb'; import { useColorMode } from '@chakra-ui/react'; import { Text } from '@/ui/Text'; -import { useTokens } from '@/app/tokens/useTokens'; +import { useTokens } from '@/appPages/tokens/useTokens'; const TokensList: FC = () => { const colorMode = useColorMode().colorMode; diff --git a/src/app/tokens/TokensList/index.tsx b/src/appPages/tokens/TokensList/index.tsx similarity index 100% rename from src/app/tokens/TokensList/index.tsx rename to src/appPages/tokens/TokensList/index.tsx diff --git a/src/app/tokens/TokensList/loading.tsx b/src/appPages/tokens/TokensList/loading.tsx similarity index 100% rename from src/app/tokens/TokensList/loading.tsx rename to src/appPages/tokens/TokensList/loading.tsx diff --git a/src/app/tokens/__tests__/TokenRow.test.tsx b/src/appPages/tokens/__tests__/TokenRow.test.tsx similarity index 100% rename from src/app/tokens/__tests__/TokenRow.test.tsx rename to src/appPages/tokens/__tests__/TokenRow.test.tsx diff --git a/src/app/tokens/__tests__/__snapshots__/TokenRow.test.tsx.snap b/src/appPages/tokens/__tests__/__snapshots__/TokenRow.test.tsx.snap similarity index 100% rename from src/app/tokens/__tests__/__snapshots__/TokenRow.test.tsx.snap rename to src/appPages/tokens/__tests__/__snapshots__/TokenRow.test.tsx.snap diff --git a/src/app/tokens/__tests__/useTokens.test.tsx b/src/appPages/tokens/__tests__/useTokens.test.tsx similarity index 93% rename from src/app/tokens/__tests__/useTokens.test.tsx rename to src/appPages/tokens/__tests__/useTokens.test.tsx index 755b91034..1b248e476 100644 --- a/src/app/tokens/__tests__/useTokens.test.tsx +++ b/src/appPages/tokens/__tests__/useTokens.test.tsx @@ -2,8 +2,8 @@ import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { renderHook, act } from '@testing-library/react-hooks'; import { useTokens } from '../useTokens'; import { FC } from 'react'; -import { useInfiniteQueryResult } from '@/app/common/hooks/useInfiniteQueryResult'; -import { useFtTokens } from '@/app/tokens/useFtTokens'; +import { useInfiniteQueryResult } from '@/appPages/common/hooks/useInfiniteQueryResult'; +import { useFtTokens } from '@/appPages/tokens/useFtTokens'; jest.mock('@/app/tokens/useFtTokens'); jest.mock('@/app/common/hooks/useInfiniteQueryResult'); diff --git a/src/app/tokens/head.tsx b/src/appPages/tokens/head.tsx similarity index 100% rename from src/app/tokens/head.tsx rename to src/appPages/tokens/head.tsx diff --git a/src/app/tokens/page.tsx b/src/appPages/tokens/page.tsx similarity index 60% rename from src/app/tokens/page.tsx rename to src/appPages/tokens/page.tsx index 30e4c484d..e460c59b4 100644 --- a/src/app/tokens/page.tsx +++ b/src/appPages/tokens/page.tsx @@ -1,8 +1,8 @@ 'use client'; -import { PageTitle } from '@/app/common/components/PageTitle'; +import { PageTitle } from '@/appPages/common/components/PageTitle'; import type { NextPage } from 'next'; -import { TokensList } from '@/app/tokens/TokensList'; +import { TokensList } from '@/appPages/tokens/TokensList'; const TokensPage: NextPage = () => ( <> diff --git a/src/app/tokens/useFtTokens.ts b/src/appPages/tokens/useFtTokens.ts similarity index 92% rename from src/app/tokens/useFtTokens.ts rename to src/appPages/tokens/useFtTokens.ts index 8913c8c6e..864abd2c6 100644 --- a/src/app/tokens/useFtTokens.ts +++ b/src/appPages/tokens/useFtTokens.ts @@ -2,7 +2,7 @@ import { useApi } from '@/common/api/client'; import { useInfiniteQuery, UseQueryOptions } from '@tanstack/react-query'; import { DEFAULT_LIST_LIMIT } from '@/common/constants'; import { getNextPageParam } from '@/common/utils'; -import { FIVE_MINUTES } from '@/app/common/queries/query-stale-time'; +import { FIVE_MINUTES } from '@/appPages/common/queries/query-stale-time'; export const useFtTokens = ( { diff --git a/src/app/tokens/useTokens.ts b/src/appPages/tokens/useTokens.ts similarity index 93% rename from src/app/tokens/useTokens.ts rename to src/appPages/tokens/useTokens.ts index 8483e2868..50cc505e3 100644 --- a/src/app/tokens/useTokens.ts +++ b/src/appPages/tokens/useTokens.ts @@ -1,7 +1,7 @@ import { useCallback, useMemo, useState } from 'react'; -import { useDebounce } from '@/app/common/hooks/use-debounce'; -import { useFtTokens } from '@/app/tokens/useFtTokens'; -import { useInfiniteQueryResult } from '@/app/common/hooks/useInfiniteQueryResult'; +import { useDebounce } from '@/appPages/common/hooks/use-debounce'; +import { useFtTokens } from '@/appPages/tokens/useFtTokens'; +import { useInfiniteQueryResult } from '@/appPages/common/hooks/useInfiniteQueryResult'; import { FtBasicMetadataResponse } from '@hirosystems/token-metadata-api-client'; export const useTokens = (): { diff --git a/src/app/transactions/head.tsx b/src/appPages/transactions/head.tsx similarity index 100% rename from src/app/transactions/head.tsx rename to src/appPages/transactions/head.tsx diff --git a/src/app/transactions/loading.tsx b/src/appPages/transactions/loading.tsx similarity index 95% rename from src/app/transactions/loading.tsx rename to src/appPages/transactions/loading.tsx index 4206ef957..ce152efd9 100644 --- a/src/app/transactions/loading.tsx +++ b/src/appPages/transactions/loading.tsx @@ -1,4 +1,4 @@ -import { TxListTabs } from '@/app/common/components/tx-lists/tabs/TxListTabs'; +import { TxListTabs } from '@/appPages/common/components/tx-lists/tabs/TxListTabs'; import { ExplorerSkeletonLoader } from '@/components/loaders/skeleton-common'; import { Box } from '@/ui/Box'; import { Flex } from '@/ui/Flex'; diff --git a/src/app/transactions/page.tsx b/src/appPages/transactions/page.tsx similarity index 86% rename from src/app/transactions/page.tsx rename to src/appPages/transactions/page.tsx index 88cfbafab..65a438ac4 100644 --- a/src/app/transactions/page.tsx +++ b/src/appPages/transactions/page.tsx @@ -1,6 +1,6 @@ 'use client'; -import { PageTitle } from '@/app/common/components/PageTitle'; +import { PageTitle } from '@/appPages/common/components/PageTitle'; import { Box } from '@/ui/components'; import { Title } from '@/ui/typography'; import { NextPage } from 'next'; diff --git a/src/app/txid/TransactionPageComponent.tsx b/src/appPages/txid/TransactionPageComponent.tsx similarity index 94% rename from src/app/txid/TransactionPageComponent.tsx rename to src/appPages/txid/TransactionPageComponent.tsx index 5849a4277..43b2004ff 100644 --- a/src/app/txid/TransactionPageComponent.tsx +++ b/src/appPages/txid/TransactionPageComponent.tsx @@ -1,8 +1,8 @@ 'use client'; -import { getTransactionTypeLabel } from '@/app/common/components/tx-lists/utils/tx'; -import { useContractById } from '@/app/common/queries/useContractById'; -import { useTxById } from '@/app/common/queries/useTxById'; +import { getTransactionTypeLabel } from '@/appPages/common/components/tx-lists/utils/tx'; +import { useContractById } from '@/appPages/common/queries/useContractById'; +import { useTxById } from '@/appPages/common/queries/useTxById'; import { useApi } from '@/common/api/client'; import { TransactionStatus } from '@/common/constants'; import { getContractId, toRelativeTime } from '@/common/utils'; diff --git a/src/app/txid/[txid]/Cards/BtcAnchorBlockCard.tsx b/src/appPages/txid/[txid]/Cards/BtcAnchorBlockCard.tsx similarity index 100% rename from src/app/txid/[txid]/Cards/BtcAnchorBlockCard.tsx rename to src/appPages/txid/[txid]/Cards/BtcAnchorBlockCard.tsx diff --git a/src/app/txid/[txid]/Cards/ContractDetailsCard.tsx b/src/appPages/txid/[txid]/Cards/ContractDetailsCard.tsx similarity index 100% rename from src/app/txid/[txid]/Cards/ContractDetailsCard.tsx rename to src/appPages/txid/[txid]/Cards/ContractDetailsCard.tsx diff --git a/src/app/txid/[txid]/CoinbasePage/TxDetails.tsx b/src/appPages/txid/[txid]/CoinbasePage/TxDetails.tsx similarity index 100% rename from src/app/txid/[txid]/CoinbasePage/TxDetails.tsx rename to src/appPages/txid/[txid]/CoinbasePage/TxDetails.tsx diff --git a/src/app/txid/[txid]/CoinbasePage/index.tsx b/src/appPages/txid/[txid]/CoinbasePage/index.tsx similarity index 100% rename from src/app/txid/[txid]/CoinbasePage/index.tsx rename to src/appPages/txid/[txid]/CoinbasePage/index.tsx diff --git a/src/app/txid/[txid]/ContractCall/TxDetails.tsx b/src/appPages/txid/[txid]/ContractCall/TxDetails.tsx similarity index 100% rename from src/app/txid/[txid]/ContractCall/TxDetails.tsx rename to src/appPages/txid/[txid]/ContractCall/TxDetails.tsx diff --git a/src/app/txid/[txid]/ContractCall/index.tsx b/src/appPages/txid/[txid]/ContractCall/index.tsx similarity index 95% rename from src/app/txid/[txid]/ContractCall/index.tsx rename to src/appPages/txid/[txid]/ContractCall/index.tsx index 6e8fa3416..87434f515 100644 --- a/src/app/txid/[txid]/ContractCall/index.tsx +++ b/src/appPages/txid/[txid]/ContractCall/index.tsx @@ -1,4 +1,4 @@ -import { useContractById } from '@/app/common/queries/useContractById'; +import { useContractById } from '@/appPages/common/queries/useContractById'; import { useApi } from '@/common/api/client'; import { getTransactionStatus } from '@/common/utils/transactions'; import { ContractSource } from '@/components/contract-source'; diff --git a/src/app/txid/[txid]/PoisonMicroblock/TxDetails.tsx b/src/appPages/txid/[txid]/PoisonMicroblock/TxDetails.tsx similarity index 100% rename from src/app/txid/[txid]/PoisonMicroblock/TxDetails.tsx rename to src/appPages/txid/[txid]/PoisonMicroblock/TxDetails.tsx diff --git a/src/app/txid/[txid]/PoisonMicroblock/index.tsx b/src/appPages/txid/[txid]/PoisonMicroblock/index.tsx similarity index 100% rename from src/app/txid/[txid]/PoisonMicroblock/index.tsx rename to src/appPages/txid/[txid]/PoisonMicroblock/index.tsx diff --git a/src/app/txid/[txid]/SmartContractPage/ContractTabs.tsx b/src/appPages/txid/[txid]/SmartContractPage/ContractTabs.tsx similarity index 85% rename from src/app/txid/[txid]/SmartContractPage/ContractTabs.tsx rename to src/appPages/txid/[txid]/SmartContractPage/ContractTabs.tsx index 1739ca422..a59414705 100644 --- a/src/app/txid/[txid]/SmartContractPage/ContractTabs.tsx +++ b/src/appPages/txid/[txid]/SmartContractPage/ContractTabs.tsx @@ -1,9 +1,9 @@ -import { useVerticallyStackedElementsBorderStyle } from '@/app/common/styles/border'; +import { useVerticallyStackedElementsBorderStyle } from '@/appPages/common/styles/border'; import { ContractWithParsedAbi } from '@/common/types/contract'; import { CodeEditor } from '@/ui/CodeEditor'; import { Tab, TabList, TabPanel, TabPanels, Tabs } from '@/ui/components'; import { FC } from 'react'; -import { ContractAvailableFunctions } from '@/app/common/components/ContractAvailableFunctions'; +import { ContractAvailableFunctions } from '@/appPages/common/components/ContractAvailableFunctions'; export const ContractTabs: FC<{ contractId: string; diff --git a/src/app/txid/[txid]/SmartContractPage/TxDetails.tsx b/src/appPages/txid/[txid]/SmartContractPage/TxDetails.tsx similarity index 100% rename from src/app/txid/[txid]/SmartContractPage/TxDetails.tsx rename to src/appPages/txid/[txid]/SmartContractPage/TxDetails.tsx diff --git a/src/app/txid/[txid]/SmartContractPage/index.tsx b/src/appPages/txid/[txid]/SmartContractPage/index.tsx similarity index 100% rename from src/app/txid/[txid]/SmartContractPage/index.tsx rename to src/appPages/txid/[txid]/SmartContractPage/index.tsx diff --git a/src/app/txid/[txid]/TokenTransfer/TxDetails.tsx b/src/appPages/txid/[txid]/TokenTransfer/TxDetails.tsx similarity index 100% rename from src/app/txid/[txid]/TokenTransfer/TxDetails.tsx rename to src/appPages/txid/[txid]/TokenTransfer/TxDetails.tsx diff --git a/src/app/txid/[txid]/TokenTransfer/index.tsx b/src/appPages/txid/[txid]/TokenTransfer/index.tsx similarity index 100% rename from src/app/txid/[txid]/TokenTransfer/index.tsx rename to src/appPages/txid/[txid]/TokenTransfer/index.tsx diff --git a/src/app/txid/[txid]/TxDetails/Amount.tsx b/src/appPages/txid/[txid]/TxDetails/Amount.tsx similarity index 100% rename from src/app/txid/[txid]/TxDetails/Amount.tsx rename to src/appPages/txid/[txid]/TxDetails/Amount.tsx diff --git a/src/app/txid/[txid]/TxDetails/BlockHash.tsx b/src/appPages/txid/[txid]/TxDetails/BlockHash.tsx similarity index 100% rename from src/app/txid/[txid]/TxDetails/BlockHash.tsx rename to src/appPages/txid/[txid]/TxDetails/BlockHash.tsx diff --git a/src/app/txid/[txid]/TxDetails/BlockHeight.tsx b/src/appPages/txid/[txid]/TxDetails/BlockHeight.tsx similarity index 100% rename from src/app/txid/[txid]/TxDetails/BlockHeight.tsx rename to src/appPages/txid/[txid]/TxDetails/BlockHeight.tsx diff --git a/src/app/txid/[txid]/TxDetails/Broadcast.tsx b/src/appPages/txid/[txid]/TxDetails/Broadcast.tsx similarity index 100% rename from src/app/txid/[txid]/TxDetails/Broadcast.tsx rename to src/appPages/txid/[txid]/TxDetails/Broadcast.tsx diff --git a/src/app/txid/[txid]/TxDetails/ClarityVersion.tsx b/src/appPages/txid/[txid]/TxDetails/ClarityVersion.tsx similarity index 100% rename from src/app/txid/[txid]/TxDetails/ClarityVersion.tsx rename to src/appPages/txid/[txid]/TxDetails/ClarityVersion.tsx diff --git a/src/app/txid/[txid]/TxDetails/ContractName.tsx b/src/appPages/txid/[txid]/TxDetails/ContractName.tsx similarity index 100% rename from src/app/txid/[txid]/TxDetails/ContractName.tsx rename to src/appPages/txid/[txid]/TxDetails/ContractName.tsx diff --git a/src/app/txid/[txid]/TxDetails/Fees.tsx b/src/appPages/txid/[txid]/TxDetails/Fees.tsx similarity index 100% rename from src/app/txid/[txid]/TxDetails/Fees.tsx rename to src/appPages/txid/[txid]/TxDetails/Fees.tsx diff --git a/src/app/txid/[txid]/TxDetails/ID.tsx b/src/appPages/txid/[txid]/TxDetails/ID.tsx similarity index 100% rename from src/app/txid/[txid]/TxDetails/ID.tsx rename to src/appPages/txid/[txid]/TxDetails/ID.tsx diff --git a/src/app/txid/[txid]/TxDetails/Memo.tsx b/src/appPages/txid/[txid]/TxDetails/Memo.tsx similarity index 100% rename from src/app/txid/[txid]/TxDetails/Memo.tsx rename to src/appPages/txid/[txid]/TxDetails/Memo.tsx diff --git a/src/app/txid/[txid]/TxDetails/NonCanonical.tsx b/src/appPages/txid/[txid]/TxDetails/NonCanonical.tsx similarity index 100% rename from src/app/txid/[txid]/TxDetails/NonCanonical.tsx rename to src/appPages/txid/[txid]/TxDetails/NonCanonical.tsx diff --git a/src/app/txid/[txid]/TxDetails/Nonce.tsx b/src/appPages/txid/[txid]/TxDetails/Nonce.tsx similarity index 100% rename from src/app/txid/[txid]/TxDetails/Nonce.tsx rename to src/appPages/txid/[txid]/TxDetails/Nonce.tsx diff --git a/src/app/txid/[txid]/TxDetails/Recipient.tsx b/src/appPages/txid/[txid]/TxDetails/Recipient.tsx similarity index 100% rename from src/app/txid/[txid]/TxDetails/Recipient.tsx rename to src/appPages/txid/[txid]/TxDetails/Recipient.tsx diff --git a/src/app/txid/[txid]/TxDetails/Sender.tsx b/src/appPages/txid/[txid]/TxDetails/Sender.tsx similarity index 100% rename from src/app/txid/[txid]/TxDetails/Sender.tsx rename to src/appPages/txid/[txid]/TxDetails/Sender.tsx diff --git a/src/app/txid/[txid]/TxDetails/__tests__/Broadcast.test.tsx b/src/appPages/txid/[txid]/TxDetails/__tests__/Broadcast.test.tsx similarity index 100% rename from src/app/txid/[txid]/TxDetails/__tests__/Broadcast.test.tsx rename to src/appPages/txid/[txid]/TxDetails/__tests__/Broadcast.test.tsx diff --git a/src/app/txid/[txid]/TxDetails/__tests__/__snapshots__/Broadcast.test.tsx.snap b/src/appPages/txid/[txid]/TxDetails/__tests__/__snapshots__/Broadcast.test.tsx.snap similarity index 100% rename from src/app/txid/[txid]/TxDetails/__tests__/__snapshots__/Broadcast.test.tsx.snap rename to src/appPages/txid/[txid]/TxDetails/__tests__/__snapshots__/Broadcast.test.tsx.snap diff --git a/src/app/txid/[txid]/TxPage.tsx b/src/appPages/txid/[txid]/TxPage.tsx similarity index 100% rename from src/app/txid/[txid]/TxPage.tsx rename to src/appPages/txid/[txid]/TxPage.tsx diff --git a/src/app/txid/[txid]/error.tsx b/src/appPages/txid/[txid]/error.tsx similarity index 93% rename from src/app/txid/[txid]/error.tsx rename to src/appPages/txid/[txid]/error.tsx index a400d08e4..9e8aa689c 100644 --- a/src/app/txid/[txid]/error.tsx +++ b/src/appPages/txid/[txid]/error.tsx @@ -1,7 +1,7 @@ 'use client'; -import { PageTitle } from '@/app/common/components/PageTitle'; -import { buildUrl } from '@/app/common/utils/buildUrl'; +import { PageTitle } from '@/appPages/common/components/PageTitle'; +import { buildUrl } from '@/appPages/common/utils/buildUrl'; import { useGlobalContext } from '@/common/context/useAppContext'; import { MessageWithIcon } from '@/components/message-with-icon'; import { Meta } from '@/components/meta-head'; diff --git a/src/app/txid/[txid]/head.tsx b/src/appPages/txid/[txid]/head.tsx similarity index 100% rename from src/app/txid/[txid]/head.tsx rename to src/appPages/txid/[txid]/head.tsx diff --git a/src/app/txid/[txid]/page.tsx b/src/appPages/txid/[txid]/page.tsx similarity index 83% rename from src/app/txid/[txid]/page.tsx rename to src/appPages/txid/[txid]/page.tsx index eeda5f9cc..24bc914a8 100644 --- a/src/app/txid/[txid]/page.tsx +++ b/src/appPages/txid/[txid]/page.tsx @@ -1,4 +1,4 @@ -import { TransactionPageComponent } from '@/app/txid/TransactionPageComponent'; +import { TransactionPageComponent } from '@/appPages/txid/TransactionPageComponent'; import { UnlockingScheduleModal } from '@/components/modals/unlocking-schedule'; import * as React from 'react'; diff --git a/src/app/txid/[txid]/utils.ts b/src/appPages/txid/[txid]/utils.ts similarity index 100% rename from src/app/txid/[txid]/utils.ts rename to src/appPages/txid/[txid]/utils.ts diff --git a/src/common/context/GlobalContext.tsx b/src/common/context/GlobalContext.tsx index bdffb1f27..392ca8b44 100644 --- a/src/common/context/GlobalContext.tsx +++ b/src/common/context/GlobalContext.tsx @@ -1,3 +1,5 @@ +'use client'; + import { DEFAULT_DEVNET_SERVER, IS_BROWSER } from '@/common/constants'; import { NetworkIdModeMap, @@ -16,6 +18,8 @@ import { buildCustomNetworkUrl, fetchCustomNetworkId, } from '@/components/modals/AddNetwork/AddNetworkForm'; +import { useSearchQuery } from '@/features/search/use-search'; +import { useSearchParams } from 'next/navigation'; interface GlobalContextProps { cookies: string; @@ -53,18 +57,28 @@ export const GlobalContext = createContext({ export const AppContextProvider: FC = ({ cookies, - queryNetworkMode, - queryApiUrl, apiUrls, btcBlockBaseUrls, btcTxBaseUrls, btcAddressBaseUrls, - querySubnet, - queryBtcBlockBaseUrl, - queryBtcTxBaseUrl, - queryBtcAddressBaseUrl, children, }) => { + console.log('apiUrls1', apiUrls); + const { chain, api, subnet, btcBlockBaseUrl, btcTxBaseUrl, btcAddressBaseUrl } = + useSearchParams(); + + const queryNetworkMode = ((Array.isArray(chain) ? chain[0] : chain) || + NetworkModes.Mainnet) as NetworkModes; + const queryApiUrl = Array.isArray(api) ? api[0] : api; + const querySubnet = Array.isArray(subnet) ? subnet[0] : subnet; + const queryBtcBlockBaseUrl = Array.isArray(btcBlockBaseUrl) + ? btcBlockBaseUrl[0] + : btcBlockBaseUrl; + const queryBtcTxBaseUrl = Array.isArray(btcTxBaseUrl) ? btcTxBaseUrl[0] : btcTxBaseUrl; + const queryBtcAddressBaseUrl = Array.isArray(btcAddressBaseUrl) + ? btcAddressBaseUrl[0] + : btcAddressBaseUrl; + if (IS_BROWSER && (window as any)?.location?.search?.includes('err=1')) throw new Error('test error'); const customNetworksCookie = JSON.parse(cookie.parse(cookies || '').customNetworks || '{}'); diff --git a/src/common/hooks/useTxsCSVData.ts b/src/common/hooks/useTxsCSVData.ts index 588df8fa6..d254db279 100644 --- a/src/common/hooks/useTxsCSVData.ts +++ b/src/common/hooks/useTxsCSVData.ts @@ -5,7 +5,7 @@ import { } from '@stacks/stacks-blockchain-api-types'; import { InfiniteData, useQueryClient } from '@tanstack/react-query'; -import { useFilterState } from '@/app/common/hooks/use-filter-state'; +import { useFilterState } from '@/appPages/common/hooks/use-filter-state'; import { microStxToStx, microToStacks } from '../utils'; export type CSVDownloadObjectType = { diff --git a/src/common/state/store.ts b/src/common/state/store.ts index 65d0b0a75..607007792 100644 --- a/src/common/state/store.ts +++ b/src/common/state/store.ts @@ -6,7 +6,7 @@ import { } from '@/features/transactions-filter/transactions-filter-slice'; import { combineReducers, configureStore } from '@reduxjs/toolkit'; -import { ConnectState, sandboxSlice } from '../../app/sandbox/sandbox-slice'; +import { ConnectState, sandboxSlice } from '@/appPages/sandbox/sandbox-slice'; const rootReducer = combineReducers({ modal: modalSlice.reducer, diff --git a/src/components/app-config.tsx b/src/components/app-config.tsx index 581f21791..019a59202 100644 --- a/src/components/app-config.tsx +++ b/src/components/app-config.tsx @@ -4,13 +4,13 @@ import { useAppSelector } from '@/common/state/hooks'; import { NetworkMode } from '@/common/types/network'; import { cache } from '@emotion/css'; import { CacheProvider } from '@emotion/react'; -import { useRouter } from 'next/router'; +import { useRouter } from 'next/navigation'; import React, { useEffect } from 'react'; import toast from 'react-hot-toast'; import { Connect } from '@stacks/connect-react'; -import { selectUserSession } from '../app/sandbox/sandbox-slice'; +import { selectUserSession } from '@/appPages/sandbox/sandbox-slice'; declare const window: any; @@ -59,7 +59,7 @@ export const AppConfig: React.FC<{ userSession, }} > - {children} + {children} ); }; diff --git a/src/components/balances/principal-token-balances.tsx b/src/components/balances/principal-token-balances.tsx index c4c3792ee..902aa9726 100644 --- a/src/components/balances/principal-token-balances.tsx +++ b/src/components/balances/principal-token-balances.tsx @@ -1,4 +1,4 @@ -import { useVerticallyStackedElementsBorderStyle } from '@/app/common/styles/border'; +import { useVerticallyStackedElementsBorderStyle } from '@/appPages/common/styles/border'; import { hexToString } from '@/common/utils'; import { TokenAssetListItem } from '@/components/balances/token-asset-list-item'; import { Section } from '@/components/section'; diff --git a/src/components/balances/stx-balance-card.tsx b/src/components/balances/stx-balance-card.tsx index 82763383f..a34d18d5b 100644 --- a/src/components/balances/stx-balance-card.tsx +++ b/src/components/balances/stx-balance-card.tsx @@ -19,7 +19,7 @@ import { TbQrcode, TbX } from 'react-icons/tb'; import { AddressBalanceResponse } from '@stacks/stacks-blockchain-api-types'; -import { useCurrentStxPrice } from '../../app/common/hooks/use-current-prices'; +import { useCurrentStxPrice } from '@/appPages/common/hooks/use-current-prices'; export const BalanceItem = ({ balance, ...rest }: any) => { const { data: stxPrice } = useCurrentStxPrice(); diff --git a/src/components/balances/token-asset-list-item.tsx b/src/components/balances/token-asset-list-item.tsx index aaf5d5c50..6229fe80f 100644 --- a/src/components/balances/token-asset-list-item.tsx +++ b/src/components/balances/token-asset-list-item.tsx @@ -1,7 +1,7 @@ 'use client'; -import { useFtMetadata } from '@/app/common/queries/useFtMetadata'; -import { useNftMetadata } from '@/app/common/queries/useNftMetadata'; +import { useFtMetadata } from '@/appPages/common/queries/useFtMetadata'; +import { useNftMetadata } from '@/appPages/common/queries/useNftMetadata'; import { useApi } from '@/common/api/client'; import { ftDecimals, getAssetNameParts, initBigNumber } from '@/common/utils'; import { TokenLink } from '@/components/links'; diff --git a/src/components/btc-stx-price.tsx b/src/components/btc-stx-price.tsx index 72abbb4d5..6e512cee1 100644 --- a/src/components/btc-stx-price.tsx +++ b/src/components/btc-stx-price.tsx @@ -1,14 +1,18 @@ +'use client'; + import { usdFormatter } from '@/common/utils'; import { Circle } from '@/components/circle'; import { Box, Icon, Flex } from '@/ui/components'; import { BitcoinIcon } from '@/ui/icons'; import { StxIcon } from '@/ui/icons/StxIcon'; import { css } from '@emotion/react'; -import dynamic from 'next/dynamic'; import * as React from 'react'; import { FC, Fragment } from 'react'; -import { useCurrentBtcPrice, useCurrentStxPrice } from '../app/common/hooks/use-current-prices'; +import { + useCurrentBtcPrice, + useCurrentStxPrice, +} from '@/appPages/common/hooks/use-current-prices'; import { ExplorerSkeletonLoader } from '@/components/loaders/skeleton-common'; const wrapperStyle = css` @@ -44,7 +48,6 @@ export const BtcStxPrice: FC = () => { } = useCurrentStxPrice(); const formattedBtcPrice = btcPrice ? usdFormatter.format(btcPrice) : ''; const formattedStxPrice = stxPrice ? usdFormatter.format(stxPrice) : ''; - return ( diff --git a/src/components/filter-button.tsx b/src/components/filter-button.tsx index eb4a18fbf..f24c1da86 100644 --- a/src/components/filter-button.tsx +++ b/src/components/filter-button.tsx @@ -6,7 +6,7 @@ import React, { memo } from 'react'; import { FiFilter } from 'react-icons/fi'; import { useColorMode } from '@chakra-ui/react'; -import { useFilterState } from '../app/common/hooks/use-filter-state'; +import { useFilterState } from '@/appPages/common/hooks/use-filter-state'; export const FilterButton = memo(() => { const { toggleFilterVisibility } = useFilterState(); diff --git a/src/components/filter-panel.tsx b/src/components/filter-panel.tsx index 9e3cb0572..c2586e5ad 100644 --- a/src/components/filter-panel.tsx +++ b/src/components/filter-panel.tsx @@ -11,7 +11,7 @@ import { RiCloseLine } from 'react-icons/ri'; import { GetTransactionListTypeEnum } from '@stacks/blockchain-api-client'; -import { useFilterState } from '../app/common/hooks/use-filter-state'; +import { useFilterState } from '@/appPages/common/hooks/use-filter-state'; const FILTERABLE_TYPES: GetTransactionListTypeEnum[] = [ GetTransactionListTypeEnum.smart_contract, diff --git a/src/components/footer.tsx b/src/components/footer.tsx index bc7ae477b..65dc3ec0d 100644 --- a/src/components/footer.tsx +++ b/src/components/footer.tsx @@ -1,4 +1,4 @@ -import { buildUrl } from '@/app/common/utils/buildUrl'; +import { buildUrl } from '@/appPages/common/utils/buildUrl'; import { useGlobalContext } from '@/common/context/useAppContext'; import { Box, Flex, TextLink } from '@/ui/components'; import Link, { LinkProps } from 'next/link'; diff --git a/src/components/function-summary/args.tsx b/src/components/function-summary/args.tsx index 2b716d560..dbb14af0a 100644 --- a/src/components/function-summary/args.tsx +++ b/src/components/function-summary/args.tsx @@ -7,7 +7,7 @@ import * as React from 'react'; import { ContractCallTransaction } from '@stacks/stacks-blockchain-api-types'; -import { useVerticallyStackedElementsBorderStyle } from '../../app/common/styles/border'; +import { useVerticallyStackedElementsBorderStyle } from '@/appPages/common/styles/border'; type FunctionArg = Singleton< Required['function_args']> diff --git a/src/components/function-summary/function-summary.tsx b/src/components/function-summary/function-summary.tsx index 41e2b97a6..a3678471d 100644 --- a/src/components/function-summary/function-summary.tsx +++ b/src/components/function-summary/function-summary.tsx @@ -8,8 +8,8 @@ import { memo } from 'react'; import { ContractCallTransaction } from '@stacks/stacks-blockchain-api-types'; -import { KeyValueHorizontal } from '../../app/common/components/KeyValueHorizontal'; -import { useVerticallyStackedElementsBorderStyle } from '../../app/common/styles/border'; +import { KeyValueHorizontal } from '@/appPages/common/components/KeyValueHorizontal'; +import { useVerticallyStackedElementsBorderStyle } from '@/appPages/common/styles/border'; export const FunctionSummarySection = memo<{ result?: any; diff --git a/src/components/function-summary/value.tsx b/src/components/function-summary/value.tsx index f0a3da677..2e5a225ff 100644 --- a/src/components/function-summary/value.tsx +++ b/src/components/function-summary/value.tsx @@ -9,7 +9,7 @@ import * as React from 'react'; import { cvToJSON, hexToCV } from '@stacks/transactions'; -import { Value } from '../../app/common/components/Value'; +import { Value } from '@/appPages/common/components/Value'; const getPrettyClarityValueType = (type: any) => { if (type === 'bool' || type === 'int' || type === 'principal' || type === 'uint') { diff --git a/src/components/links.tsx b/src/components/links.tsx index 3542d356a..4b3186818 100644 --- a/src/components/links.tsx +++ b/src/components/links.tsx @@ -1,4 +1,4 @@ -import { buildUrl } from '@/app/common/utils/buildUrl'; +import { buildUrl } from '@/appPages/common/utils/buildUrl'; import { useGlobalContext } from '@/common/context/useAppContext'; import { Network } from '@/common/types/network'; import { forwardRef } from '@chakra-ui/react'; diff --git a/src/components/loaders/skeleton-transaction.tsx b/src/components/loaders/skeleton-transaction.tsx index e3c4880b0..84d2020be 100644 --- a/src/components/loaders/skeleton-transaction.tsx +++ b/src/components/loaders/skeleton-transaction.tsx @@ -1,12 +1,12 @@ -import { PageTitle } from '@/app/common/components/PageTitle'; -import { TwoColumnPage } from '@/app/common/components/TwoColumnPage'; -import { ConnectToStacks } from '@/app/sandbox/layout/ConnectToStacks'; -import { Header } from '@/app/sandbox/layout/Header'; -import { RightPanel } from '@/app/sandbox/layout/RightPanel'; -import { SideNav } from '@/app/sandbox/layout/SideNav'; -import { setUserData, toggleRightPanel } from '@/app/sandbox/sandbox-slice'; -import { BtcAnchorBlockCard } from '@/app/txid/[txid]/Cards/BtcAnchorBlockCard'; -import { ContractDetailsCard } from '@/app/txid/[txid]/Cards/ContractDetailsCard'; +import { PageTitle } from '@/appPages/common/components/PageTitle'; +import { TwoColumnPage } from '@/appPages/common/components/TwoColumnPage'; +import { ConnectToStacks } from '@/appPages/sandbox/layout/ConnectToStacks'; +import { Header } from '@/appPages/sandbox/layout/Header'; +import { RightPanel } from '@/appPages/sandbox/layout/RightPanel'; +import { SideNav } from '@/appPages/sandbox/layout/SideNav'; +import { setUserData, toggleRightPanel } from '@/appPages/sandbox/sandbox-slice'; +import { BtcAnchorBlockCard } from '@/appPages/txid/[txid]/Cards/BtcAnchorBlockCard'; +import { ContractDetailsCard } from '@/appPages/txid/[txid]/Cards/ContractDetailsCard'; import { TwoColsListItem } from '@/common/components/TwoColumnsListItem'; import { hasStxBalance, hasTokenBalance } from '@/common/utils/accounts'; import { TokenBalancesCard } from '@/components/balances/principal-token-balances'; diff --git a/src/components/modals/AddNetwork/AddNetworkForm.tsx b/src/components/modals/AddNetwork/AddNetworkForm.tsx index 1e1d3ecce..0b81b3406 100644 --- a/src/components/modals/AddNetwork/AddNetworkForm.tsx +++ b/src/components/modals/AddNetwork/AddNetworkForm.tsx @@ -1,4 +1,4 @@ -import { getQueryParams } from '@/app/common/utils/buildUrl'; +import { getQueryParams } from '@/appPages/common/utils/buildUrl'; import { fetchFromApi } from '@/common/api/fetch'; import { DEFAULT_V2_INFO_ENDPOINT } from '@/common/constants'; import { NetworkIdModeMap } from '@/common/constants/network'; diff --git a/src/components/network-items.tsx b/src/components/network-items.tsx index 0758a79fe..8954b6e28 100644 --- a/src/components/network-items.tsx +++ b/src/components/network-items.tsx @@ -1,7 +1,7 @@ 'use client'; -import { ONE_MINUTE } from '@/app/common/queries/query-stale-time'; -import { getQueryParams } from '@/app/common/utils/buildUrl'; +import { ONE_MINUTE } from '@/appPages/common/queries/query-stale-time'; +import { getQueryParams } from '@/appPages/common/utils/buildUrl'; import { getNetworkModeFromNetworkId } from '@/common/api/utils'; import { Badge } from '@/common/components/Badge'; import { DEFAULT_V2_INFO_ENDPOINT, MODALS } from '@/common/constants'; diff --git a/src/components/post-conditions.tsx b/src/components/post-conditions.tsx index 4e420562a..35d2fe81b 100644 --- a/src/components/post-conditions.tsx +++ b/src/components/post-conditions.tsx @@ -27,9 +27,9 @@ import { Transaction, } from '@stacks/stacks-blockchain-api-types'; -import { ListItem } from '../app/common/components/ListItem'; -import { useVerticallyStackedElementsBorderStyle } from '../app/common/styles/border'; -import { StxPriceButton } from '@/app/common/components/StxPriceButton'; +import { ListItem } from '@/appPages/common/components/ListItem'; +import { useVerticallyStackedElementsBorderStyle } from '@/appPages/common/styles/border'; +import { StxPriceButton } from '@/appPages/common/components/StxPriceButton'; const getConditionType = (type: PostCondition['type']) => { switch (type) { diff --git a/src/components/timestamp.tsx b/src/components/timestamp.tsx index 2c6d08dd4..551807400 100644 --- a/src/components/timestamp.tsx +++ b/src/components/timestamp.tsx @@ -3,7 +3,7 @@ import { Box, Flex, Tooltip } from '@/ui/components'; import * as React from 'react'; import { TbClock } from 'react-icons/tb'; -import { Value } from '../app/common/components/Value'; +import { Value } from '@/appPages/common/components/Value'; interface TimestampProps { ts: number; diff --git a/src/components/transaction-item.tsx b/src/components/transaction-item.tsx index 4afbb3ce0..114235ee9 100644 --- a/src/components/transaction-item.tsx +++ b/src/components/transaction-item.tsx @@ -1,4 +1,4 @@ -import { buildUrl } from '@/app/common/utils/buildUrl'; +import { buildUrl } from '@/appPages/common/utils/buildUrl'; import { useGlobalContext } from '@/common/context/useAppContext'; import { toRelativeTime, truncateMiddle } from '@/common/utils'; import { getTransactionStatus } from '@/common/utils/transactions'; @@ -12,9 +12,9 @@ import { HiOutlineArrowSmRight } from 'react-icons/hi'; import { MempoolTransaction, Transaction } from '@stacks/stacks-blockchain-api-types'; -import { TxIcon, getTxTypeIcon } from '../app/common/components/TxIcon'; -import { useTxTitle } from '../app/common/components/tx-lists/common/utils/tx'; -import { getTransactionTypeLabel } from '../app/common/components/tx-lists/utils/tx'; +import { TxIcon, getTxTypeIcon } from '@/appPages/common/components/TxIcon'; +import { useTxTitle } from '@/appPages/common/components/tx-lists/common/utils/tx'; +import { getTransactionTypeLabel } from '@/appPages/common/components/tx-lists/utils/tx'; export { getTxTypeIcon }; diff --git a/src/components/transaction-list.tsx b/src/components/transaction-list.tsx index 201d77129..6b0f0cb3f 100644 --- a/src/components/transaction-list.tsx +++ b/src/components/transaction-list.tsx @@ -13,7 +13,7 @@ import { TransactionResults, } from '@stacks/stacks-blockchain-api-types'; -import { useFilterState } from '../app/common/hooks/use-filter-state'; +import { useFilterState } from '@/appPages/common/hooks/use-filter-state'; const Item: React.FC< { tx: MempoolTransaction | Transaction; isLast?: boolean; principal?: string } & BoxProps diff --git a/src/components/tx-events.tsx b/src/components/tx-events.tsx index 01c3132dd..76babdbb5 100644 --- a/src/components/tx-events.tsx +++ b/src/components/tx-events.tsx @@ -1,6 +1,6 @@ 'use client'; -import { useFtMetadata } from '@/app/common/queries/useFtMetadata'; +import { useFtMetadata } from '@/appPages/common/queries/useFtMetadata'; import { useApi } from '@/common/api/client'; import { addSepBetweenStrings, @@ -26,8 +26,8 @@ import { TransactionEventAssetType, } from '@stacks/stacks-blockchain-api-types'; -import { ListItem } from '../app/common/components/ListItem'; -import { useVerticallyStackedElementsBorderStyle } from '../app/common/styles/border'; +import { ListItem } from '@/appPages/common/components/ListItem'; +import { useVerticallyStackedElementsBorderStyle } from '@/appPages/common/styles/border'; import { Pending } from './status'; import { deserialize, prettyPrint } from '@stacks/transactions/dist/cl'; diff --git a/src/components/tx-title.tsx b/src/components/tx-title.tsx index c95c1c1ef..d50b48e45 100644 --- a/src/components/tx-title.tsx +++ b/src/components/tx-title.tsx @@ -1,4 +1,4 @@ -import { PageTitle } from '@/app/common/components/PageTitle'; +import { PageTitle } from '@/appPages/common/components/PageTitle'; import { TxStatus } from '@/common/types/tx'; import { getContractName, getFunctionName, microToStacks } from '@/common/utils'; import { getTransactionStatus } from '@/common/utils/transactions'; diff --git a/src/features/address-page/address-summary.tsx b/src/features/address-page/address-summary.tsx index 151ec9740..a83e26f5c 100644 --- a/src/features/address-page/address-summary.tsx +++ b/src/features/address-page/address-summary.tsx @@ -3,9 +3,9 @@ import { TokenBalancesRow } from '@/components/balances/token-balances-row'; import { Section } from '@/components/section'; import { Box, Flex } from '@/ui/components'; -import { KeyValueHorizontal } from '../../app/common/components/KeyValueHorizontal'; -import { Value } from '../../app/common/components/Value'; -import { useVerticallyStackedElementsBorderStyle } from '../../app/common/styles/border'; +import { KeyValueHorizontal } from '@/appPages/common/components/KeyValueHorizontal'; +import { Value } from '@/appPages/common/components/Value'; +import { useVerticallyStackedElementsBorderStyle } from '@/appPages/common/styles/border'; export const AddressSummary = ({ principal, diff --git a/src/features/blocks-visualizer/index.tsx b/src/features/blocks-visualizer/index.tsx index 643220a11..6e092ecb1 100644 --- a/src/features/blocks-visualizer/index.tsx +++ b/src/features/blocks-visualizer/index.tsx @@ -1,4 +1,4 @@ -import { buildUrl } from '@/app/common/utils/buildUrl'; +import { buildUrl } from '@/appPages/common/utils/buildUrl'; import { useApi } from '@/common/api/client'; import { useGlobalContext } from '@/common/context/useAppContext'; import { Box, Icon, Spinner, Tooltip } from '@/ui/components'; @@ -13,7 +13,7 @@ import { TbCurrencyBitcoin } from 'react-icons/tb'; import { Block as BlockType } from '@stacks/stacks-blockchain-api-types'; -import { useBlockListInfinite } from '../../app/common/queries/useBlockListInfinite'; +import { useBlockListInfinite } from '@/appPages/common/queries/useBlockListInfinite'; const wrapperStyle = css` display: flex; diff --git a/src/features/search/items/block-result-item.tsx b/src/features/search/items/block-result-item.tsx index 7c2013356..46d55a7bf 100644 --- a/src/features/search/items/block-result-item.tsx +++ b/src/features/search/items/block-result-item.tsx @@ -1,4 +1,4 @@ -import { BlockListItem } from '@/app/components/BlockList/BlockListItem'; +import { BlockListItem } from '@/appPages/components/BlockList/BlockListItem'; import { FoundResult } from '@/common/types/search-results'; import { Box } from '@/ui/components'; import { css } from '@emotion/react'; diff --git a/src/features/search/items/result-item-wrapper.tsx b/src/features/search/items/result-item-wrapper.tsx index 28e39095b..2e643e69a 100644 --- a/src/features/search/items/result-item-wrapper.tsx +++ b/src/features/search/items/result-item-wrapper.tsx @@ -3,7 +3,7 @@ import React, { FC } from 'react'; import { forwardRef } from '@chakra-ui/react'; import Link, { LinkProps } from 'next/link'; import { useGlobalContext } from '@/common/context/useAppContext'; -import { buildUrl } from '@/app/common/utils/buildUrl'; +import { buildUrl } from '@/appPages/common/utils/buildUrl'; export const ResultItemWrapper = forwardRef(({ children, ...rest }, ref) => ( diff --git a/src/features/search/items/tx-result-item.tsx b/src/features/search/items/tx-result-item.tsx index 7f322f338..c5c820aed 100644 --- a/src/features/search/items/tx-result-item.tsx +++ b/src/features/search/items/tx-result-item.tsx @@ -1,5 +1,5 @@ -import { MempoolTxListItem } from '@/app/common/components/tx-lists/list-items/MempoolTxListItem'; -import { TxListItem } from '@/app/common/components/tx-lists/list-items/TxListItem'; +import { MempoolTxListItem } from '@/appPages/common/components/tx-lists/list-items/MempoolTxListItem'; +import { TxListItem } from '@/appPages/common/components/tx-lists/list-items/TxListItem'; import { FoundResult } from '@/common/types/search-results'; import { Box } from '@/ui/components'; import { css } from '@emotion/react'; diff --git a/src/features/search/use-search.ts b/src/features/search/use-search.ts index 9009d4c88..c8a491962 100644 --- a/src/features/search/use-search.ts +++ b/src/features/search/use-search.ts @@ -15,7 +15,7 @@ import { useQuery } from '@tanstack/react-query'; import { Block } from '@stacks/stacks-blockchain-api-types'; import { bufferCVFromString, cvToHex, tupleCV } from '@stacks/transactions'; -import { useDebounce } from '../../app/common/hooks/use-debounce'; +import { useDebounce } from '@/appPages/common/hooks/use-debounce'; export const useSearchQuery = (id: string) => { const { searchApi, blocksApi, nonFungibleTokensApi } = useApi(); diff --git a/src/global-styles.tsx b/src/global-styles.tsx index e5729f5f9..5e572e72b 100644 --- a/src/global-styles.tsx +++ b/src/global-styles.tsx @@ -1,3 +1,5 @@ +'use client'; + import { Global, css } from '@emotion/react'; import * as React from 'react'; diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index 7bb185b26..153fa288d 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -1,15 +1,15 @@ -import { PageWrapper } from '@/app/PageWrapper'; -import { Providers } from '@/app/Providers'; -import AppError from '@/app/error'; -import { IS_BROWSER } from '@/common/constants'; +import { PageWrapper } from '../appPages/PageWrapper'; +import { Providers } from '../appPages/Providers'; +import AppError from '../appPages/error'; +import { IS_BROWSER } from '../common/constants'; import { NetworkModeBtcBlockBaseUrlMap, NetworkModeBtcTxBaseUrlMap, NetworkModeBtcAddressBaseUrlMap, NetworkModeUrlMap, -} from '@/common/constants/network'; -import { AppContextProvider } from '@/common/context/GlobalContext'; -import { NetworkModes } from '@/common/types/network'; +} from '../common/constants/network'; +import { AppContextProvider } from '../common/context/GlobalContext'; +import { NetworkModes } from '../common/types/network'; import type { AppContext } from 'next/app'; import * as React from 'react'; import { ErrorBoundary } from 'react-error-boundary'; @@ -29,6 +29,7 @@ function ExplorerApp({ querySubnet, pageProps, }: any) { + console.log('APP'); return ( ( @@ -65,6 +66,7 @@ function ExplorerApp({ } ExplorerApp.getInitialProps = (appContext: AppContext) => { + console.log('[DEBUG] getInitialProps'); const query = appContext.ctx.query; const queryNetworkMode = ((Array.isArray(query.chain) ? query.chain[0] : query.chain) || NetworkModes.Mainnet) as NetworkModes; diff --git a/src/pages/address/[principal].tsx b/src/pages/address/[principal].tsx index f2d74a482..223f7ecbe 100644 --- a/src/pages/address/[principal].tsx +++ b/src/pages/address/[principal].tsx @@ -1,11 +1,11 @@ -import AppAddressPageError from '@/app/address/[principal]/error'; +import AppAddressPageError from '@/appPages/address/[principal]/error'; import { SkeletonPageWithTwoColumns } from '@/components/loaders/skeleton-transaction'; import dynamic from 'next/dynamic'; import { useRouter } from 'next/router'; import * as React from 'react'; import { ErrorBoundary } from 'react-error-boundary'; -const AppAddressPage = dynamic(() => import('../../app/address/[principal]/page'), { +const AppAddressPage = dynamic(() => import('@/appPages/address/[principal]/page'), { loading: () => , ssr: false, }); diff --git a/src/pages/block/[hash].tsx b/src/pages/block/[hash].tsx index 3f0495739..10c14276f 100644 --- a/src/pages/block/[hash].tsx +++ b/src/pages/block/[hash].tsx @@ -1,4 +1,4 @@ -import AppBlockPageError from '@/app/block/[hash]/error'; +import AppBlockPageError from '@/appPages/block/[hash]/error'; import { SkeletonPageWithTwoColumns } from '@/components/loaders/skeleton-transaction'; import { Meta } from '@/components/meta-head'; import dynamic from 'next/dynamic'; @@ -6,7 +6,7 @@ import { useRouter } from 'next/router'; import * as React from 'react'; import { ErrorBoundary } from 'react-error-boundary'; -const AppBlockPage = dynamic(() => import('../../app/block/[hash]/page'), { +const AppBlockPage = dynamic(() => import('@/appPages/block/[hash]/page'), { loading: () => , ssr: false, }); diff --git a/src/pages/blocks.tsx b/src/pages/blocks.tsx index 9d25c2566..a436648ea 100644 --- a/src/pages/blocks.tsx +++ b/src/pages/blocks.tsx @@ -1,7 +1,7 @@ import { Meta } from '@/components/meta-head'; import * as React from 'react'; -import AppBlocksPage from '../app/blocks/page'; +import AppBlocksPage from '@/appPages/blocks/page'; export default function BlocksPage() { return ( diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 9fb31663d..68eafed57 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -1,4 +1,4 @@ -import { HomeClient } from '@/app/HomeClient'; +import { HomeClient } from '@/appPages/HomeClient'; import { Meta } from '@/components/meta-head'; import { FC } from 'react'; diff --git a/src/pages/microblock/[hash].tsx b/src/pages/microblock/[hash].tsx index 4e2d907e8..19179ea2f 100644 --- a/src/pages/microblock/[hash].tsx +++ b/src/pages/microblock/[hash].tsx @@ -1,11 +1,11 @@ -import AppMicroblockPageError from '@/app/microblock/[hash]/error'; +import AppMicroblockPageError from '@/appPages/microblock/[hash]/error'; import { SkeletonPageWithOneColumn } from '@/components/loaders/skeleton-transaction'; import dynamic from 'next/dynamic'; import { useRouter } from 'next/router'; import * as React from 'react'; import { ErrorBoundary } from 'react-error-boundary'; -const AppMicroblockPage = dynamic(() => import('../../app/microblock/[hash]/page'), { +const AppMicroblockPage = dynamic(() => import('@/appPages/microblock/[hash]/page'), { loading: () => , ssr: false, }); diff --git a/src/pages/sandbox/contract-call/[[...params]].tsx b/src/pages/sandbox/contract-call/[[...params]].tsx index ab9a3f0d8..2d28378a6 100644 --- a/src/pages/sandbox/contract-call/[[...params]].tsx +++ b/src/pages/sandbox/contract-call/[[...params]].tsx @@ -5,7 +5,7 @@ import { useRouter } from 'next/router'; import * as React from 'react'; const AppSandboxContractPage = dynamic( - () => import('../../../app/sandbox/contract-call/[[...params]]/page'), + () => import('@/appPages/sandbox/contract-call/[[...params]]/page'), { loading: () => , ssr: false, diff --git a/src/pages/sandbox/deploy.tsx b/src/pages/sandbox/deploy.tsx index dd65500ee..e8921a4b0 100644 --- a/src/pages/sandbox/deploy.tsx +++ b/src/pages/sandbox/deploy.tsx @@ -1,15 +1,15 @@ -import { claritySyntax } from '@/app/common/claritySyntax'; +import { claritySyntax } from '@/appPages/common/claritySyntax'; import { SkeletonSandbox } from '@/components/loaders/skeleton-transaction'; import { Spinner } from '@/ui/Spinner'; import dynamic from 'next/dynamic'; import * as React from 'react'; -const AppSandboxDeployPage = dynamic(() => import('../../app/sandbox/deploy/page'), { +const AppSandboxDeployPage = dynamic(() => import('@/appPages/sandbox/deploy/page'), { loading: () => , ssr: false, }); -const Layout = dynamic(() => import('@/app/sandbox/layout'), { +const Layout = dynamic(() => import('@/appPages/sandbox/layout'), { loading: () => , ssr: false, }); diff --git a/src/pages/sandbox/faucet.tsx b/src/pages/sandbox/faucet.tsx index f99fb9056..8614f0a2a 100644 --- a/src/pages/sandbox/faucet.tsx +++ b/src/pages/sandbox/faucet.tsx @@ -3,12 +3,12 @@ import { Spinner } from '@/ui/Spinner'; import dynamic from 'next/dynamic'; import * as React from 'react'; -const AppSandboxFaucetPage = dynamic(() => import('../../app/sandbox/faucet/page'), { +const AppSandboxFaucetPage = dynamic(() => import('@/appPages/sandbox/faucet/page'), { loading: () => , ssr: false, }); -const Layout = dynamic(() => import('@/app/sandbox/layout'), { +const Layout = dynamic(() => import('@/appPages/sandbox/layout'), { loading: () => , ssr: false, }); diff --git a/src/pages/sandbox/transfer.tsx b/src/pages/sandbox/transfer.tsx index 2b25c1cde..e117c9020 100644 --- a/src/pages/sandbox/transfer.tsx +++ b/src/pages/sandbox/transfer.tsx @@ -3,12 +3,12 @@ import { Spinner } from '@/ui/Spinner'; import dynamic from 'next/dynamic'; import * as React from 'react'; -const AppSandboxTransferPage = dynamic(() => import('../../app/sandbox/transfer/page'), { +const AppSandboxTransferPage = dynamic(() => import('@/appPages/sandbox/transfer/page'), { loading: () => , ssr: false, }); -const Layout = dynamic(() => import('@/app/sandbox/layout'), { +const Layout = dynamic(() => import('@/appPages/sandbox/layout'), { loading: () => , ssr: false, }); diff --git a/src/pages/token/[tokenId].tsx b/src/pages/token/[tokenId].tsx index 6c3baa1b2..97836a97e 100644 --- a/src/pages/token/[tokenId].tsx +++ b/src/pages/token/[tokenId].tsx @@ -3,7 +3,7 @@ import { apiClients, createConfig } from '@/common/api/client'; import { DEFAULT_MAINNET_SERVER } from '@/common/constants'; import { Configuration as TokenMetadataApiConfiguration } from '@hirosystems/token-metadata-api-client'; -import { TokenPage } from '@/app/token/[tokenId]'; +import { TokenPage } from '@/appPages/token/[tokenId]'; import { getCacheClient } from '@/common/utils/cache-client'; interface TokenLinks { diff --git a/src/pages/tokens.tsx b/src/pages/tokens.tsx index f0c8d03af..55be86826 100644 --- a/src/pages/tokens.tsx +++ b/src/pages/tokens.tsx @@ -1,10 +1,10 @@ import { Meta } from '@/components/meta-head'; import dynamic from 'next/dynamic'; -import { PageTitle } from '@/app/common/components/PageTitle'; -import { Loading as TokenListLoading } from '@/app/tokens/TokensList/loading'; +import { PageTitle } from '@/appPages/common/components/PageTitle'; +import { Loading as TokenListLoading } from '@/appPages/tokens/TokensList/loading'; -const AppTokensPage = dynamic(() => import('../app/tokens/page'), { +const AppTokensPage = dynamic(() => import('@/appPages/tokens/page'), { loading: () => ( <> Token Tracker diff --git a/src/pages/transactions.tsx b/src/pages/transactions.tsx index bb75a0dd5..d09d9da26 100644 --- a/src/pages/transactions.tsx +++ b/src/pages/transactions.tsx @@ -1,6 +1,6 @@ import { Meta } from '@/components/meta-head'; -import AppTransactionsPage from '../app/transactions/page'; +import AppTransactionsPage from '@/appPages/transactions/page'; export default function TransactionsPage() { return ( diff --git a/src/pages/txid/[txid].tsx b/src/pages/txid/[txid].tsx index 9ef5d1c26..4e2362bb2 100644 --- a/src/pages/txid/[txid].tsx +++ b/src/pages/txid/[txid].tsx @@ -1,13 +1,13 @@ -import { claritySyntax } from '@/app/common/claritySyntax'; +import { claritySyntax } from '@/appPages/common/claritySyntax'; import { SkeletonPageWithTagsAndTwoColumns } from '@/components/loaders/skeleton-transaction'; import dynamic from 'next/dynamic'; import { useRouter } from 'next/router'; import * as React from 'react'; import { ErrorBoundary } from 'react-error-boundary'; -import AppTxidPageError from '../../app/txid/[txid]/error'; +import AppTxidPageError from '@/appPages/txid/[txid]/error'; -export const AppTxidPage = dynamic(() => import('../../app/txid/[txid]/page'), { +export const AppTxidPage = dynamic(() => import('@/appPages/txid/[txid]/page'), { loading: () => , ssr: false, }); diff --git a/src/pages/_document.tsx b/src/pages/x_document.tsx similarity index 100% rename from src/pages/_document.tsx rename to src/pages/x_document.tsx diff --git a/src/ui/CodeEditor/index.tsx b/src/ui/CodeEditor/index.tsx index e350231b3..43f26150b 100644 --- a/src/ui/CodeEditor/index.tsx +++ b/src/ui/CodeEditor/index.tsx @@ -4,11 +4,10 @@ import Prism from 'prismjs'; import 'prismjs/components/prism-json'; import { FC, memo, useState } from 'react'; -import { autocomplete, hover } from '../../app/sandbox/editor-config/autocomplete'; -import { defineTheme } from '../../app/sandbox/editor-config/define-theme'; -import { liftOff } from '../../app/sandbox/editor-config/init'; -import { configLanguage } from '../../app/sandbox/editor-config/language'; -import { Button } from '@/ui/Button'; +import { autocomplete, hover } from '@/appPages/sandbox/editor-config/autocomplete'; +import { defineTheme } from '@/appPages/sandbox/editor-config/define-theme'; +import { liftOff } from '@/appPages/sandbox/editor-config/init'; +import { configLanguage } from '@/appPages/sandbox/editor-config/language'; import { Box } from '@/ui/Box'; import { MdExpand } from 'react-icons/md'; import { IconButton } from '@/ui/IconButton'; diff --git a/src/ui/UIProvider.tsx b/src/ui/UIProvider.tsx index 56d483236..6ca0dd9cd 100644 --- a/src/ui/UIProvider.tsx +++ b/src/ui/UIProvider.tsx @@ -1,5 +1,8 @@ +'use client'; + import { theme } from '@/ui/theme/theme'; import { ChakraProvider, ChakraProviderProps, cookieStorageManagerSSR } from '@chakra-ui/react'; +import { CacheProvider } from '@chakra-ui/next-js'; import { FC } from 'react'; export interface UIProviderProps extends ChakraProviderProps { @@ -9,8 +12,10 @@ export const UIProvider: FC = props => { const { cookies = '', children } = props; const colorModeManager = cookieStorageManagerSSR(cookies); return ( - - {children} - + + + {children} + + ); }; diff --git a/tsconfig.json b/tsconfig.json index 83d0ccd6e..ff185227d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -15,10 +15,10 @@ "isolatedModules": true, "jsx": "preserve", "useUnknownInCatchVariables": false, - "paths": { - "@/*": ["./*"] - }, - "baseUrl": "src", + "baseUrl": "./src", + "@/*": [ + "/*" + ], "incremental": true, "skipLibCheck": true, "plugins": [