fix: use base url instead of hardcoded url (#3635)

This commit is contained in:
Liyas Thomas
2023-12-12 15:06:28 +05:30
committed by GitHub
parent ebf90207e5
commit a55f214102
7 changed files with 33 additions and 25 deletions

View File

@@ -21,7 +21,12 @@ const props = defineProps<{
label?: string | undefined
}>()
const shortcodeBaseURL =
import.meta.env.VITE_SHORTCODE_BASE_URL ?? "https://hopp.sh"
const text = computed(() => {
return props.label ? t(props.label) : `hopp.sh/r/${props.link ?? "xxxx"}`
return props.label
? t(props.label)
: `${shortcodeBaseURL}/r/${props.link ?? "xxxx"}`
})
</script>