mirror of
https://github.com/hanzonet/explore.git
synced 2026-10-30 18:16:57 +00:00
* add canonical link tag * change title templates * adjust title for dapps category pages * change h1 titles * Revert "adjust title for dapps category pages" This reverts commit 88ec5228ff839f6559db9bb29922e23334819911. * fix unit test
25 lines
474 B
TypeScript
25 lines
474 B
TypeScript
import type { Route } from 'nextjs-routes';
|
|
|
|
import config from 'configs/app';
|
|
|
|
const CANONICAL_ROUTES: Array<Route['pathname']> = [
|
|
'/',
|
|
'/txs',
|
|
'/ops',
|
|
'/verified-contracts',
|
|
'/name-domains',
|
|
'/withdrawals',
|
|
'/tokens',
|
|
'/stats',
|
|
'/api-docs',
|
|
'/graphiql',
|
|
'/gas-tracker',
|
|
'/apps',
|
|
];
|
|
|
|
export default function getCanonicalUrl(pathname: Route['pathname']) {
|
|
if (CANONICAL_ROUTES.includes(pathname)) {
|
|
return config.app.baseUrl + pathname;
|
|
}
|
|
}
|