Skip to content
This repository was archived by the owner on Nov 13, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions explorer/src/components/common/DeprecatingBanner.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { EXTERNAL_ROUTES } from '../../constants/routes'
import Link from 'next/link'
import { useIndexers } from 'hooks/useIndexers'
import { NetworkId } from '@autonomys/auto-utils'

export const DeprecatingBanner = () => {
const { network } = useIndexers()
return (
<div className='container mx-auto mb-4 flex grow justify-center px-5 md:px-[25px] 2xl:px-0'>
<div className='sticky top-0 z-10 w-full'>
<div className='w-full rounded-lg bg-[#DDEFF1] p-5 shadow dark:border-none dark:bg-boxDark'>
<div className='flex flex-col gap-4 text-center md:text-left'>
<div className='text-[20px] font-bold text-[#282929] dark:text-white'>
Astral will be deprecated soon
</div>
<div className='text-[15px] text-[#282929] dark:text-white'>
Astral will be deprecated soon. From that point Subscan will be the only way to access
up-to-date network data and features. You can also use Polkadot.js Apps to interact
with the chain.
</div>
Comment thread
clostao marked this conversation as resolved.
<div className='flex flex-col items-center gap-4 md:flex-row md:items-center'>
{network === NetworkId.MAINNET && (
Comment thread
clostao marked this conversation as resolved.
<Link href={EXTERNAL_ROUTES.subscan} target='_blank'>
<button className='self-start rounded-lg bg-white px-[33px] py-[13px] text-sm font-medium text-gray-800 hover:bg-gray-200 dark:bg-[#1E254E] dark:text-white'>
Visit Subscan
</button>
</Link>
)}
<Link className='ml-4' href={EXTERNAL_ROUTES.polkadot(network)} target='_blank'>
Comment thread
clostao marked this conversation as resolved.
<button className='self-start rounded-lg bg-white px-[33px] py-[13px] text-sm font-medium text-gray-800 hover:bg-gray-200 dark:bg-[#1E254E] dark:text-white'>
Visit Polkadot.js Apps
</button>
</Link>
</div>
</div>
</div>
</div>
</div>
)
}
8 changes: 3 additions & 5 deletions explorer/src/components/layout/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

import { CookieBanner } from 'components/common/CookieBanner'
import { ErrorFallback } from 'components/common/ErrorFallback'
import { useOutOfSyncBanner } from 'components/common/OutOfSyncBanner'
import { UnsupportedNetworkBanner } from 'components/common/UnsupportedNetworkBanner'
import { Container } from 'components/layout/Container'
import Footer from 'components/layout/Footer'
import { SectionHeader } from 'components/layout/SectionHeader'
Expand All @@ -12,6 +10,8 @@ import { FC, ReactNode, useEffect } from 'react'
import { ErrorBoundary } from 'react-error-boundary'
import ReactGA from 'react-ga4'
import { logError } from 'utils/log'
import { DeprecatingBanner } from '../common/DeprecatingBanner'
import { UnsupportedNetworkBanner } from '../common/UnsupportedNetworkBanner'

type Props = {
children?: ReactNode
Expand All @@ -20,16 +20,14 @@ type Props = {

export const MainLayout: FC<Props> = ({ children, subHeader }) => {
const pathname = usePathname()
const outOfSync = useOutOfSyncBanner()

useEffect(() => {
ReactGA.send({ hitType: 'pageview', page: pathname })
}, [pathname])

return (
<div className='relative flex min-h-screen w-full flex-col bg-gradient-to-b from-backgroundLight to-backgroundDark dark:bg-boxDark dark:from-backgroundDarker dark:to-backgroundDarkest'>
<div className='relative flex min-h-screen w-full flex-col'>
{outOfSync}
<DeprecatingBanner />
<UnsupportedNetworkBanner />
<SectionHeader />
{subHeader}
Expand Down
1 change: 1 addition & 0 deletions indexers/dictionary
Submodule dictionary added at 31a839
Loading