From 5471ce64f3fc4d42edf4896be2a7ac543469bad1 Mon Sep 17 00:00:00 2001 From: rohitmalhotra1420 Date: Mon, 9 Dec 2024 14:34:28 +0530 Subject: [PATCH 1/3] changed the folder strcuture for transaction page --- .github/workflows/nextjs.yml | 20 +++++++++---------- .../{[txHash].tsx => [txHash]/page.tsx} | 18 ++++++++--------- 2 files changed, 18 insertions(+), 20 deletions(-) rename pages/transactions/{[txHash].tsx => [txHash]/page.tsx} (51%) diff --git a/.github/workflows/nextjs.yml b/.github/workflows/nextjs.yml index 99e949e..55e3486 100644 --- a/.github/workflows/nextjs.yml +++ b/.github/workflows/nextjs.yml @@ -70,16 +70,16 @@ jobs: static_site_generator: next # Step 5: Restore build cache - # - name: Restore cache - # uses: actions/cache@v3 - # with: - # path: | - # .next/cache - # # Generate a new cache whenever packages or source files change. - # key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }} - # # If source files changed but packages didn't, rebuild from a prior cache. - # restore-keys: | - # ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}- + - name: Restore cache + uses: actions/cache@v3 + with: + path: | + .next/cache + # Generate a new cache whenever packages or source files change. + key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }} + # If source files changed but packages didn't, rebuild from a prior cache. + restore-keys: | + ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}- # Step 6: Conditionally set NEXT_PUBLIC_BASE_PATH based on the repository - name: Set base path for GitHub Pages diff --git a/pages/transactions/[txHash].tsx b/pages/transactions/[txHash]/page.tsx similarity index 51% rename from pages/transactions/[txHash].tsx rename to pages/transactions/[txHash]/page.tsx index d2b3e25..09e3202 100644 --- a/pages/transactions/[txHash].tsx +++ b/pages/transactions/[txHash]/page.tsx @@ -4,18 +4,16 @@ import dynamic from 'next/dynamic'; import Head from 'next/head'; // Internal Components imports -// import { Spinner } from '../../blocks'; -import Layout from '../../layout'; -import TransactionDetailsView from '../../sections/Transactions/txHash'; +import { Spinner } from '../../blocks'; -// const Layout = dynamic(() => import('../../layout')); +const Layout = dynamic(() => import('../../../layout')); -// const TransactionDetailsView = dynamic( -// () => import('../../sections/Transactions/txHash'), -// { -// loading: () => , -// } -// ); +const TransactionDetailsView = dynamic( + () => import('../../../sections/Transactions/txHash'), + { + loading: () => , + } +); const TransactionDetailsPage = () => { return ( From db6fa7377a94e9ed77bf9dc52c5b475585e73429 Mon Sep 17 00:00:00 2001 From: rohitmalhotra1420 Date: Mon, 9 Dec 2024 15:50:17 +0530 Subject: [PATCH 2/3] reverted back the changes --- next.config.js | 1 - pages/transactions/{[txHash]/page.tsx => [txHash].tsx} | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) rename pages/transactions/{[txHash]/page.tsx => [txHash].tsx} (82%) diff --git a/next.config.js b/next.config.js index 30b372c..0af1f03 100644 --- a/next.config.js +++ b/next.config.js @@ -1,6 +1,5 @@ /** @type {import('next').NextConfig} */ const nextConfig = { - output: 'export', reactStrictMode: false, swcMinify: true, devIndicators: { diff --git a/pages/transactions/[txHash]/page.tsx b/pages/transactions/[txHash].tsx similarity index 82% rename from pages/transactions/[txHash]/page.tsx rename to pages/transactions/[txHash].tsx index 09e3202..04ad3a1 100644 --- a/pages/transactions/[txHash]/page.tsx +++ b/pages/transactions/[txHash].tsx @@ -6,10 +6,10 @@ import Head from 'next/head'; // Internal Components imports import { Spinner } from '../../blocks'; -const Layout = dynamic(() => import('../../../layout')); +const Layout = dynamic(() => import('../../layout')); const TransactionDetailsView = dynamic( - () => import('../../../sections/Transactions/txHash'), + () => import('../../sections/Transactions/txHash'), { loading: () => , } From 5e42b23acdfaeee45a34e747b0db1db05d062b80 Mon Sep 17 00:00:00 2001 From: rohitmalhotra1420 Date: Mon, 9 Dec 2024 17:58:54 +0530 Subject: [PATCH 3/3] google analytics added --- pages/_document.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pages/_document.js b/pages/_document.js index cd953ee..da64c7a 100644 --- a/pages/_document.js +++ b/pages/_document.js @@ -49,6 +49,20 @@ class MyDocument extends Document { name="viewport" content="width=device-width, initial-scale=1.0" /> + +