From 16d71b902ec0afecd1d7417e490e0081f59ea47f Mon Sep 17 00:00:00 2001 From: DaMandal0rian Date: Mon, 6 May 2024 23:51:26 +0300 Subject: [PATCH] fixes --- lib/hooks/useConfigSentry.tsx | 16 ---------------- lib/tx/sortTxs.ts | 21 --------------------- pages/l2-deposits.tsx | 19 ------------------- pages/l2-output-roots.tsx | 19 ------------------- pages/l2-txn-batches.tsx | 19 ------------------- pages/l2-withdrawals.tsx | 19 ------------------- 6 files changed, 113 deletions(-) delete mode 100644 lib/hooks/useConfigSentry.tsx delete mode 100644 lib/tx/sortTxs.ts delete mode 100644 pages/l2-deposits.tsx delete mode 100644 pages/l2-output-roots.tsx delete mode 100644 pages/l2-txn-batches.tsx delete mode 100644 pages/l2-withdrawals.tsx diff --git a/lib/hooks/useConfigSentry.tsx b/lib/hooks/useConfigSentry.tsx deleted file mode 100644 index 2f8f4022c2..0000000000 --- a/lib/hooks/useConfigSentry.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import * as Sentry from '@sentry/react'; -import React from 'react'; - -import { config, configureScope } from 'configs/sentry/react'; - -export default function useConfigSentry() { - React.useEffect(() => { - if (!config) { - return; - } - - // gotta init sentry in browser - Sentry.init(config); - Sentry.configureScope(configureScope); - }, []); -} diff --git a/lib/tx/sortTxs.ts b/lib/tx/sortTxs.ts deleted file mode 100644 index 776638afe7..0000000000 --- a/lib/tx/sortTxs.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { Transaction } from 'types/api/transaction'; -import type { Sort } from 'types/client/txs-sort'; - -import compareBns from 'lib/bigint/compareBns'; - -const sortTxs = (sorting?: Sort) => (tx1: Transaction, tx2: Transaction) => { - switch (sorting) { - case 'val-desc': - return compareBns(tx1.value, tx2.value); - case 'val-asc': - return compareBns(tx2.value, tx1.value); - case 'fee-desc': - return compareBns(tx1.fee.value, tx2.fee.value); - case 'fee-asc': - return compareBns(tx2.fee.value, tx1.fee.value); - default: - return 0; - } -}; - -export default sortTxs; diff --git a/pages/l2-deposits.tsx b/pages/l2-deposits.tsx deleted file mode 100644 index 0c445b4706..0000000000 --- a/pages/l2-deposits.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import type { NextPage } from 'next'; -import dynamic from 'next/dynamic'; -import React from 'react'; - -import PageNextJs from 'nextjs/PageNextJs'; - -const L2Deposits = dynamic(() => import('ui/pages/L2Deposits'), { ssr: false }); - -const Page: NextPage = () => { - return ( - - - - ); -}; - -export default Page; - -export { L2 as getServerSideProps } from 'nextjs/getServerSideProps'; diff --git a/pages/l2-output-roots.tsx b/pages/l2-output-roots.tsx deleted file mode 100644 index 06a84a5c9b..0000000000 --- a/pages/l2-output-roots.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import type { NextPage } from 'next'; -import dynamic from 'next/dynamic'; -import React from 'react'; - -import PageNextJs from 'nextjs/PageNextJs'; - -const L2OutputRoots = dynamic(() => import('ui/pages/L2OutputRoots'), { ssr: false }); - -const Page: NextPage = () => { - return ( - - - - ); -}; - -export default Page; - -export { L2 as getServerSideProps } from 'nextjs/getServerSideProps'; diff --git a/pages/l2-txn-batches.tsx b/pages/l2-txn-batches.tsx deleted file mode 100644 index 391a77c283..0000000000 --- a/pages/l2-txn-batches.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import type { NextPage } from 'next'; -import dynamic from 'next/dynamic'; -import React from 'react'; - -import PageNextJs from 'nextjs/PageNextJs'; - -const L2TxnBatches = dynamic(() => import('ui/pages/L2TxnBatches'), { ssr: false }); - -const Page: NextPage = () => { - return ( - - - - ); -}; - -export default Page; - -export { L2 as getServerSideProps } from 'nextjs/getServerSideProps'; diff --git a/pages/l2-withdrawals.tsx b/pages/l2-withdrawals.tsx deleted file mode 100644 index 0814bf4a10..0000000000 --- a/pages/l2-withdrawals.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import type { NextPage } from 'next'; -import dynamic from 'next/dynamic'; -import React from 'react'; - -import PageNextJs from 'nextjs/PageNextJs'; - -const L2Withdrawals = dynamic(() => import('ui/pages/L2Withdrawals'), { ssr: false }); - -const Page: NextPage = () => { - return ( - - - - ); -}; - -export default Page; - -export { L2 as getServerSideProps } from 'nextjs/getServerSideProps';