From 341b7e9fe3582388d8e8118e9fdf66e958f2ad57 Mon Sep 17 00:00:00 2001 From: pandablue0809 Date: Thu, 14 Aug 2025 18:31:06 +0900 Subject: [PATCH 1/3] init explorer page --- pages/_app.js | 3 +- pages/explorer2.js | 116 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 118 insertions(+), 1 deletion(-) create mode 100644 pages/explorer2.js diff --git a/pages/_app.js b/pages/_app.js index bd0178fa1..8f227facc 100644 --- a/pages/_app.js +++ b/pages/_app.js @@ -163,7 +163,8 @@ const MyApp = ({ Component, pageProps }) => { '/terms-and-conditions', '/press', '/404', - '/faucet' + '/faucet', + '/explorer2' ] if (showTopAds) { showTopAds = !pagesWithNoTopAdds.includes(pathname) && !pathname.includes('/admin') diff --git a/pages/explorer2.js b/pages/explorer2.js new file mode 100644 index 000000000..925ae40aa --- /dev/null +++ b/pages/explorer2.js @@ -0,0 +1,116 @@ +import { serverSideTranslations } from 'next-i18next/serverSideTranslations' +import { useTranslation } from 'next-i18next' +import Head from 'next/head' +import Link from 'next/link' + +import { server, explorerName, nativeCurrency } from '../utils' +import { getIsSsrMobile } from '../utils/mobile' + +import SEO from '../components/SEO' +import SearchBlock from '../components/Layout/SearchBlock' +import Ads from '../components/Layout/Ads' + +export async function getServerSideProps(context) { + const { locale } = context + return { + props: { + isSsrMobile: getIsSsrMobile(context), + ...(await serverSideTranslations(locale, ['common'])) + } + } +} + +const ldJsonWebsite = { + '@context': 'https://schema.org', + '@type': 'WebSite', + name: nativeCurrency + ' Explorer', + alternateName: [nativeCurrency + ' Explorer', explorerName + ' Explorer', 'Scan ' + nativeCurrency + ' Ledger'], + url: server, + potentialAction: { + '@type': 'SearchAction', + target: { + '@type': 'EntryPoint', + urlTemplate: server + '/explorer2/?r={search_term_string}' + }, + 'query-input': 'required name=search_term_string' + } +} + +export default function Explorer2({ isSsrMobile, showAds }) { + const { t } = useTranslation() + + return ( + <> + + +