-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7251662
commit b14e78c
Showing
2 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<template v-if="newNetworkUrl"> | ||
<div class="deprecated-alert"> | ||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||
<path | ||
d="M21.0907 18.7005C20.8457 19.1905 20.3449 19.5 19.7971 19.5H4.20288C3.65506 19.5 3.15426 19.1905 2.90927 18.7005C2.69455 18.2711 2.70694 17.7631 2.94232 17.3446L10.9455 3.11671C11.1598 2.73575 11.5629 2.5 12 2.5C12.4371 2.5 12.8402 2.73575 13.0545 3.11671L21.0577 17.3446C21.2931 17.7631 21.3054 18.2711 21.0907 18.7005Z" | ||
stroke="#FFC81A" | ||
/> | ||
<circle cx="12" cy="16" r="1" fill="#FFC81A" /> | ||
<path d="M12 14V6" stroke="#FFC81A" /> | ||
</svg> | ||
<span | ||
>We are ending our support of Goerli testnet. Please <a :href="newNetworkUrl!">use Sepolia</a>. For more info see | ||
<a target="_blank" href="https://github.com/zkSync-Community-Hub/zkync-developers/discussions/228" | ||
>this announcement</a | ||
>.</span | ||
> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import { computed } from "vue"; | ||
import { useRoute } from "vue-router"; | ||
import useContext from "@/composables/useContext"; | ||
import { getWindowLocation } from "@/utils/helpers"; | ||
const route = useRoute(); | ||
const { networks } = useContext(); | ||
const newNetworkUrl = computed(() => { | ||
const network = networks.value?.find((network) => network.name === "sepolia"); | ||
if (network) { | ||
const { hostname, origin } = getWindowLocation(); | ||
if (hostname === "localhost" || hostname.endsWith("web.app") || !network.hostnames?.length) { | ||
console.log(route); | ||
return `${origin}?network=${network.name}`; | ||
} | ||
return network.hostnames[0]; | ||
} | ||
return null; | ||
}); | ||
</script> | ||
|
||
<style scoped lang="scss"> | ||
.deprecated-alert { | ||
@apply flex text-white rounded-2xl border border-amber-400/50 bg-amber-400/10 mb-6 py-3 px-4; | ||
svg { | ||
@apply mr-2; | ||
} | ||
a { | ||
@apply text-inherit; | ||
} | ||
} | ||
</style> |