diff --git a/packages/hoppscotch-common/src/components/embeds/index.vue b/packages/hoppscotch-common/src/components/embeds/index.vue
index 345f76afd..dee53a39f 100644
--- a/packages/hoppscotch-common/src/components/embeds/index.vue
+++ b/packages/hoppscotch-common/src/components/embeds/index.vue
@@ -105,9 +105,11 @@ const requestCancelFunc: Ref<(() => void) | null> = ref(null)
const loading = ref(false)
-const baseURL = import.meta.env.VITE_SHORTCODE_BASE_URL ?? "https://hopp.sh"
+const shortcodeBaseURL =
+ import.meta.env.VITE_SHORTCODE_BASE_URL ?? "https://hopp.sh"
+
const sharedRequestURL = computed(() => {
- return `${baseURL}/r/${props.sharedRequestID}`
+ return `${shortcodeBaseURL}/r/${props.sharedRequestID}`
})
const { subscribeToStream } = useStreamSubscriber()
diff --git a/packages/hoppscotch-common/src/components/share/CustomizeModal.vue b/packages/hoppscotch-common/src/components/share/CustomizeModal.vue
index c5abdd007..d810b3814 100644
--- a/packages/hoppscotch-common/src/components/share/CustomizeModal.vue
+++ b/packages/hoppscotch-common/src/components/share/CustomizeModal.vue
@@ -370,10 +370,11 @@ const linkVariants: LinkVariant[] = [
},
]
-const baseURL = import.meta.env.VITE_SHORTCODE_BASE_URL ?? "https://hopp.sh"
+const shortcodeBaseURL =
+ import.meta.env.VITE_SHORTCODE_BASE_URL ?? "https://hopp.sh"
const copyEmbed = () => {
- return ``
}
const copyButton = (
@@ -390,18 +391,18 @@ const copyButton = (
}
if (type === "markdown") {
- return `[](${baseURL}/r/${props.request?.id})`
+ return `[](${shortcodeBaseURL}/r/${props.request?.id})`
}
- return `
`
+ return `
`
}
const copyLink = (variationID: string) => {
if (variationID === "link1") {
- return `${baseURL}/r/${props.request?.id}`
+ return `${shortcodeBaseURL}/r/${props.request?.id}`
} else if (variationID === "link2") {
- return `Run in Hoppscotch`
+ return `Run in Hoppscotch`
}
- return `[Run in Hoppscotch](${baseURL}/r/${props.request?.id})`
+ return `[Run in Hoppscotch](${shortcodeBaseURL}/r/${props.request?.id})`
}
const copyContent = ({
diff --git a/packages/hoppscotch-common/src/components/share/templates/Link.vue b/packages/hoppscotch-common/src/components/share/templates/Link.vue
index 42ce75930..ee509c330 100644
--- a/packages/hoppscotch-common/src/components/share/templates/Link.vue
+++ b/packages/hoppscotch-common/src/components/share/templates/Link.vue
@@ -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"}`
})