Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

revert location.href

Steven Teyb55d1652b267
diff --git a/apps/web/app/deeplink/[domain]/[key]/action-buttons.tsx b/apps/web/app/deeplink/[domain]/[key]/action-buttons.tsx
index 947581085c..264824b51a 100644
--- a/apps/web/app/deeplink/[domain]/[key]/action-buttons.tsx
+++ b/apps/web/app/deeplink/[domain]/[key]/action-buttons.tsx
@@ -8,10 +8,10 @@ export function DeepLinkActionButtons({ link }: { link: EdgeLinkProps }) {
const handleClick = async ({ withCopy }: { withCopy?: boolean } = {}) => {
if (withCopy) {
- copyToClipboard(link.shortLink);
+ await copyToClipboard(link.shortLink);
}
- window.location.href = link.shortLink;
+ window.location.href = link.ios || link.url;
};
return (
diff --git a/apps/web/app/deeplink/[domain]/[key]/brand-logo-badge.tsx b/apps/web/app/deeplink/[domain]/[key]/brand-logo-badge.tsx
index bf2fbacb64..1621024f4c 100644
--- a/apps/web/app/deeplink/[domain]/[key]/brand-logo-badge.tsx
+++ b/apps/web/app/deeplink/[domain]/[key]/brand-logo-badge.tsx
@@ -9,9 +9,9 @@ export function BrandLogoBadge({ link }: { link: EdgeLinkProps }) {
return (
<button
- onClick={() => {
- copyToClipboard(link.shortLink);
- window.location.href = link.shortLink;
+ onClick={async () => {
+ await copyToClipboard(link.shortLink);
+ window.location.href = link.ios || link.url;
}}
className="inline-flex items-center gap-2 rounded-full bg-white px-3 py-1.5 shadow-lg shadow-black/10 ring-1 ring-neutral-200"
>