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.

update UI

Steven Tey1049c3c9c57f
diff --git a/packages/stripe-app/src/utils/create-link.ts b/packages/stripe-app/src/utils/create-link.ts
index c057eb479d..235493c754 100644
--- a/packages/stripe-app/src/utils/create-link.ts
+++ b/packages/stripe-app/src/utils/create-link.ts
@@ -15,6 +15,7 @@ export async function createLink({
method: "POST",
body: JSON.stringify({
url,
+ ...(token ? { trackConversion: true } : {}),
}),
headers: {
"Content-Type": "application/json",
diff --git a/packages/stripe-app/src/views/create-link.tsx b/packages/stripe-app/src/views/create-link.tsx
index 0c8c8e49b9..a7a2c47796 100644
--- a/packages/stripe-app/src/views/create-link.tsx
+++ b/packages/stripe-app/src/views/create-link.tsx
@@ -53,36 +53,30 @@ export const CreateLink = ({ workspace }: { workspace: Workspace | null }) => {
label="Destination URL"
placeholder="https://dub.co/help/article/what-is-dub"
hiddenElements={["label"]}
- size="large"
onChange={(e) => setUrl(e.target.value)}
value={url}
/>
<Button
type="primary"
- size="large"
onPress={handleCreateLink}
disabled={isSubmitting || !url}
>
- {isSubmitting ? "Creating..." : "Create link"}
+ {isSubmitting ? "Shortening..." : "Shorten link"}
</Button>
</FormFieldGroup>
-
{shortLink && (
<Link href={shortLink} target="_blank">
{shortLink}
</Link>
)}
-
- {!workspace && (
- <Button
- type="secondary"
- size="small"
- target="_blank"
- href="https://d.to/register"
- >
- Connect to Dub to shorten more links
- </Button>
- )}
+ <Box
+ css={{
+ borderTopColor: "neutral",
+ }}
+ >
+ Want to claim your links and view analytics for them? Connect your Dub
+ workspace.
+ </Box>
</Box>
);
};
diff --git a/packages/stripe-app/stripe-app.json b/packages/stripe-app/stripe-app.json
index 453b4f912f..7c38b7e5b4 100644
--- a/packages/stripe-app/stripe-app.json
+++ b/packages/stripe-app/stripe-app.json
@@ -62,6 +62,10 @@
"type": "settings",
"url": ""
},
- "stripe_api_access_type": "platform",
+ "allowed_redirect_uris": [
+ "https://app.dub.co/api/stripe/integration/callback",
+ "https://preview.dub.co/api/stripe/integration/callback"
+ ],
+ "stripe_api_access_type": "oauth",
"distribution_type": "public"
-}
\ No newline at end of file
+}