Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
stxphxn committed Sep 19, 2024
1 parent 441bd06 commit 07679ac
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
5 changes: 3 additions & 2 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};
Expand Down
2 changes: 1 addition & 1 deletion src/lib/config/etherlink/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: ``,
Expand Down
2 changes: 1 addition & 1 deletion src/lib/config/taiko/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`,
Expand Down
14 changes: 7 additions & 7 deletions src/plugins/router/nav-guards.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ref } from 'vue';
import { useFavicon } from '@vueuse/core';
import {
// getRedirectUrlFor,
getRedirectUrlFor,
handleNetworkSlug,
networkFromSlug,
networkSlug,
Expand Down Expand Up @@ -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();
});

Expand Down

0 comments on commit 07679ac

Please sign in to comment.