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.

Youtube verification modal

Marcus Farrell078cb301ab94
diff --git a/apps/web/lib/actions/partners/verify-social-account-by-code.ts b/apps/web/lib/actions/partners/verify-social-account-by-code.ts
index 10dbd4230a..4c682cb2e4 100644
--- a/apps/web/lib/actions/partners/verify-social-account-by-code.ts
+++ b/apps/web/lib/actions/partners/verify-social-account-by-code.ts
@@ -141,7 +141,7 @@ export const verifySocialAccountByCodeAction = authPartnerActionClient
if (!isValid) {
throw new Error(
- `The verification code was not found in your ${
+ `The verification code was not found in your English ${
platform === "youtube" ? "channel description" : "bio"
}. Please add the code exactly as provided, save your changes, and try again.`,
);
diff --git a/apps/web/ui/modals/social-verification-by-code-modal.tsx b/apps/web/ui/modals/social-verification-by-code-modal.tsx
index b5f2365e6d..a976c7c1a4 100644
--- a/apps/web/ui/modals/social-verification-by-code-modal.tsx
+++ b/apps/web/ui/modals/social-verification-by-code-modal.tsx
@@ -19,7 +19,7 @@ interface SocialVerificationByCodeModalProps {
interface PlatformInfo {
name: string;
title: string;
- instruction: string;
+ instruction: ReactNode;
openLabel: string;
verifyTitle: string;
verifyDescription: string;
@@ -32,9 +32,24 @@ const PLATFORM_INFO: Record<
> = {
youtube: {
name: "YouTube",
- title: "Edit your YouTube channel",
- instruction:
- "Navigate to your channel settings and add the 6 digit code above to your channel description temporarily. If you have an English description, add it there.",
+ title: "Edit your YouTube channel description",
+ instruction: (
+ <>
+ Add the 6-digit code above to your English channel description
+ temporarily.
+ {"\n\n"}
+ Add to your main description if it’s in English. Otherwise, add the code
+ to an existing English description, or create one first.{" "}
+ <a
+ href="https://dub.co/help/article/partner-profile#youtube"
+ target="_blank"
+ rel="noopener noreferrer"
+ className="underline transition-colors hover:text-content-emphasis"
+ >
+ Learn more
+ </a>
+ </>
+ ),
openLabel: "Open channel",
verifyTitle: "Verify account",
verifyDescription:
@@ -75,6 +90,7 @@ export function SocialVerificationByCodeModal(
<Modal
showModal={props.showSocialVerificationModal}
setShowModal={props.setShowSocialVerificationModal}
+ className="max-h-[calc(100dvh-64px)] sm:max-h-[90dvh]"
>
<SocialVerificationByCodeModalInner {...props} />
</Modal>
@@ -130,7 +146,7 @@ function SocialVerificationByCodeModalInner({
return (
<>
- <div className="flex items-center justify-between border-b border-neutral-200 p-4 sm:px-6">
+ <div className="sticky top-7 z-10 flex items-center justify-between border-b border-neutral-200 bg-white p-4 sm:top-0 sm:px-6">
<h3 className="text-lg font-semibold leading-none">
Verify {platformInfo.name} account
</h3>
@@ -210,7 +226,7 @@ function Step({
}: {
stepNumber: number;
title: string;
- description: string;
+ description: ReactNode;
children?: ReactNode;
}) {
return (
@@ -220,7 +236,7 @@ function Step({
</div>
<div className="space-y-1">
<h4 className="text-sm font-medium text-black">{title}</h4>
- <p className="text-content-default text-sm font-normal">
+ <p className="text-content-default whitespace-pre-line text-sm font-normal">
{description}
</p>
</div>