diff --git a/src/pages/Login/VerifyEmail.vue b/src/pages/Login/VerifyEmail.vue index 860b5bd89..dae20e8b6 100644 --- a/src/pages/Login/VerifyEmail.vue +++ b/src/pages/Login/VerifyEmail.vue @@ -4,7 +4,7 @@ import { useI18n } from 'vue-i18n'; import { useRoute } from 'vue-router'; import VnLogo from 'components/ui/VnLogo.vue'; -import { getUrl } from 'src/composables/getUrl'; +import axios from 'axios'; const route = useRoute(); @@ -14,20 +14,26 @@ const redirectButtons = ref([]); onMounted(async () => { const params = route?.query; + const { data } = await axios.get(`Urls/${params.userId}/get-by-user`); + redirectButtons.value.push({ color: 'bg-vnColor', icon: new URL(`../../assets/vn_icon.svg`, import.meta.url).href, text: 'goToShop', - url: await getUrl(null, 'hedera'), + url: data.find((url) => url.appName == 'hedera').url, }); - if (params?.isWorker && JSON.parse(params?.isWorker)) { - redirectButtons.value.push({ - color: 'bg-primary', - icon: new URL(`../../assets/salix_icon.svg`, import.meta.url).href, - text: 'logIn', - url: '', - }); + const urls = data.filter((url) => url.appName != 'hedera'); + if (urls.length) { + for (const url of urls) { + redirectButtons.value.push({ + color: 'bg-primary', + icon: new URL(`../../assets/${url.appName}_icon.svg`, import.meta.url) + .href, + text: 'logIn', + url: url.url, + }); + } } });