diff --git a/src/constants/url.ts b/src/constants/url.ts index 118b8b5..60eb96d 100644 --- a/src/constants/url.ts +++ b/src/constants/url.ts @@ -1,3 +1,4 @@ export const TINY_API_URL = 'https://staging-tinysite-api.realdevsquad.com/v1'; export const TINY_API_GOOGLE_LOGIN = `${TINY_API_URL}/auth/google/login`; export const TINY_API_LOGOUT = `${TINY_API_URL}/auth/logout`; +export const BASE_SHORT_URL = 'https://staging-tinysite.realdevsquad.com'; diff --git a/src/pages/dashboard/index.tsx b/src/pages/dashboard/index.tsx index cdad4b1..0757960 100644 --- a/src/pages/dashboard/index.tsx +++ b/src/pages/dashboard/index.tsx @@ -7,6 +7,7 @@ import Button from '@/components/Button'; import CopyIcon from '../../../public/assets/icons/copy'; import Toast from '@/components/Toast'; import shortenUrl from '@/utils/shortenUrl'; +import { BASE_SHORT_URL } from '@/constants/url'; interface InputSectionProps { url: string; @@ -85,7 +86,8 @@ const Dashboard = () => { const generateShortUrl = async () => { const newShortUrl = await shortenUrl(url, userData); if (newShortUrl) { - setShortUrl(newShortUrl); + const fullShortUrl = `${BASE_SHORT_URL}/${newShortUrl}`; + setShortUrl(fullShortUrl); setShowInputBox(true); } };