diff --git a/explorer/src/components/ExplorerStats/ChainOverviewCard.tsx b/explorer/src/components/ExplorerStats/ChainOverviewCard.tsx index 07275f56..10bc3aba 100644 --- a/explorer/src/components/ExplorerStats/ChainOverviewCard.tsx +++ b/explorer/src/components/ExplorerStats/ChainOverviewCard.tsx @@ -72,7 +72,7 @@ const ChainOverviewCard: React.FC = ({ Icon, iconStyle, cover={} hoverable={!!totalCount} bordered={false} - onClick={() => !!totalCount && navigate(`/${intl.locale}/explorer?emitterChain=${dataKey}`)} + onClick={() => !!totalCount && navigate(`/${intl.locale}/explorer/?emitterChain=${dataKey}`)} loading={loading} bodyStyle={{ display: 'flex', diff --git a/explorer/src/components/Layout/DefaultLayout.tsx b/explorer/src/components/Layout/DefaultLayout.tsx index 11e7683f..3129cfc1 100644 --- a/explorer/src/components/Layout/DefaultLayout.tsx +++ b/explorer/src/components/Layout/DefaultLayout.tsx @@ -120,7 +120,7 @@ const DefaultLayout: React.FC<{}> = ({ const menuItems = [
- +
, @@ -130,7 +130,7 @@ const DefaultLayout: React.FC<{}> = ({ ,
- +
, diff --git a/explorer/src/pages/404.tsx b/explorer/src/pages/404.tsx index d301f99a..9c38d0c5 100644 --- a/explorer/src/pages/404.tsx +++ b/explorer/src/pages/404.tsx @@ -1,12 +1,26 @@ import React from 'react' import { Result } from 'antd' import { useIntl } from 'gatsby-plugin-intl'; +import { PageProps } from 'gatsby'; +const isBrowser = typeof window !== "undefined" -export default () => { +export default (props: PageProps) => { + // TEMP - handle GCP bucket redirect, remove "index.html" from the route. + // This handles an edge case where the user lands without a trailing slash, + // and GCP redirects them to + '/index.html', because the route did not match + // a file in the bucket. + // Can remove this when we move away from GCP storage bucket hosting. + if (isBrowser) { + if (props.location.href.includes('index.html')) { + const uri = props.location.pathname.replace('index.html', '') + props.location.search + window.location.replace(uri) + return null // don't render anything, user will be redirected. + } + } const intl = useIntl() return } diff --git a/explorer/src/pages/about.tsx b/explorer/src/pages/about.tsx index c840be14..3d006e73 100644 --- a/explorer/src/pages/about.tsx +++ b/explorer/src/pages/about.tsx @@ -13,6 +13,7 @@ const { useBreakpoint } = Grid import { ReactComponent as LayeredSquares } from '~/icons/layered-squares.svg'; import { ReactComponent as Hole } from '~/icons/hole.svg'; +import { DOCS_URL } from '~/utils/misc/constants'; const BriefAboutSection = ({ intl, smScreen }: { intl: IntlShape, smScreen: boolean }) => (
@@ -89,7 +90,7 @@ const HowSection = ({ intl, smScreen }: { intl: IntlShape, smScreen: boolean })