diff --git a/src/App.vue b/src/App.vue index 9f321b60..47494ef5 100644 --- a/src/App.vue +++ b/src/App.vue @@ -95,8 +95,9 @@ const themeMap = { const updateTheme = () => { // Assuming your slug is part of the path like /theme/slug // You need to adjust this based on your actual route structure - const themeSlug = route.path.split('/')[1]; // Get the slug from the path - const theme = themeMap[themeSlug] || 'telos'; // Set the theme or default if not found + // const themeSlug = route.path.split('/')[1]; // Get the slug from the path + + const theme = themeMap[networkSlug] || 'telos'; // Set the theme or default if not found document.documentElement.setAttribute('data-theme', theme); }; diff --git a/src/lib/config/etherlink/index.ts b/src/lib/config/etherlink/index.ts index 7077e78b..61772329 100644 --- a/src/lib/config/etherlink/index.ts +++ b/src/lib/config/etherlink/index.ts @@ -17,7 +17,7 @@ const config: Config = { network: 'etherlink', trustWalletNetwork: 'etherlink', unknown: false, - visibleInUI: true, + visibleInUI: false, testNetwork: false, rpc: 'https://node.mainnet.etherlink.com', ws: ``, diff --git a/src/lib/config/taiko/index.ts b/src/lib/config/taiko/index.ts index 98b57e44..93531796 100644 --- a/src/lib/config/taiko/index.ts +++ b/src/lib/config/taiko/index.ts @@ -17,7 +17,7 @@ const config: Config = { network: 'taiko', trustWalletNetwork: 'taiko', unknown: false, - visibleInUI: true, + visibleInUI: false, testNetwork: false, rpc: `https://rpc.mainnet.taiko.xyz`, ws: `wss://ws.mainnet.taiko.xyz`, diff --git a/src/plugins/router/nav-guards.ts b/src/plugins/router/nav-guards.ts index 21b69986..ed9000b5 100644 --- a/src/plugins/router/nav-guards.ts +++ b/src/plugins/router/nav-guards.ts @@ -1,7 +1,7 @@ import { ref } from 'vue'; import { useFavicon } from '@vueuse/core'; import { - // getRedirectUrlFor, + getRedirectUrlFor, handleNetworkSlug, networkFromSlug, networkSlug, @@ -52,13 +52,13 @@ export function hardRedirectTo(url: string) { */ function applyNetworkSubdomainRedirect(router: Router): Router { router.beforeEach((to, from, next) => { - // const redirectUrl = getRedirectUrlFor( - // window.location.host, - // to.redirectedFrom?.fullPath ?? to.fullPath, - // to.params - // ); + const redirectUrl = getRedirectUrlFor( + window.location.host, + to.redirectedFrom?.fullPath ?? to.fullPath, + to.params + ); - // if (redirectUrl) window.location.href = redirectUrl; + if (redirectUrl) window.location.href = redirectUrl; next(); });