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.

fix custom login

Steven Tey356edcb05c6c
diff --git a/apps/web/.env.example b/apps/web/.env.example
index e8faab8b2b..3a2a69e681 100644
--- a/apps/web/.env.example
+++ b/apps/web/.env.example
@@ -133,9 +133,9 @@ SLACK_SIGNING_SECRET=
DYNADOT_API_KEY=
# Online Presence Verification
-NEXT_PUBLIC_YOUTUBE_CLIENT_ID=
+YOUTUBE_CLIENT_ID=
YOUTUBE_CLIENT_SECRET=
-NEXT_PUBLIC_X_CLIENT_ID=
+X_CLIENT_ID=
X_CLIENT_SECRET=
-NEXT_PUBLIC_TIKTOK_CLIENT_ID=
+TIKTOK_CLIENT_ID=
TIKTOK_CLIENT_SECRET=
\ No newline at end of file
diff --git a/apps/web/app/api/partners/route.ts b/apps/web/app/api/partners/route.ts
index 10c4c9208e..9c2f61452f 100644
--- a/apps/web/app/api/partners/route.ts
+++ b/apps/web/app/api/partners/route.ts
@@ -123,7 +123,6 @@ export const GET = withWorkspace(
return {
...partner,
createdAt: new Date(partner.enrollmentCreatedAt),
- payoutsEnabledAt: new Date(partner.payoutsEnabledAt),
clicks: Number(partner.totalClicks),
leads: Number(partner.totalLeads),
sales: Number(partner.totalSales),
diff --git a/apps/web/app/partners.dub.co/(auth)/(custom)/framer/login/layout.tsx b/apps/web/app/partners.dub.co/(auth)/(custom)/framer/login/layout.tsx
index 598316018a..54f582d4bb 100644
--- a/apps/web/app/partners.dub.co/(auth)/(custom)/framer/login/layout.tsx
+++ b/apps/web/app/partners.dub.co/(auth)/(custom)/framer/login/layout.tsx
@@ -1,17 +1,10 @@
import { Grid, Wordmark } from "@dub/ui";
-import { redirect } from "next/navigation";
export default function CustomPartnerAuthLayout({
- params: { programSlug },
children,
}: {
- params: { programSlug: string };
children: React.ReactNode;
}) {
- if (programSlug !== "framer") {
- redirect("/login");
- }
-
return (
<div className="flex min-h-screen flex-col">
<div className="fixed inset-0 [mask-image:radial-gradient(60%_60%_at_50%_0%,black,transparent)]">
diff --git a/apps/web/app/partners.dub.co/(auth)/(custom)/framer/login/page.tsx b/apps/web/app/partners.dub.co/(auth)/(custom)/framer/login/page.tsx
index 6528648aec..c044f924fb 100644
--- a/apps/web/app/partners.dub.co/(auth)/(custom)/framer/login/page.tsx
+++ b/apps/web/app/partners.dub.co/(auth)/(custom)/framer/login/page.tsx
@@ -1,22 +1,13 @@
import { FramerButton } from "@/ui/auth/login/framer-button";
import { APP_DOMAIN, constructMetadata } from "@dub/utils";
import Link from "next/link";
-import { redirect } from "next/navigation";
export const metadata = constructMetadata({
title: `Sign in to Framer Partners`,
canonicalUrl: `${APP_DOMAIN}/login`,
});
-export default function CustomPartnerLoginPage({
- params: { programSlug },
-}: {
- params: { programSlug: string };
-}) {
- if (programSlug !== "framer") {
- redirect("/login");
- }
-
+export default function CustomPartnerLoginPage() {
return (
<div className="mx-auto my-10 flex w-full max-w-sm flex-col gap-8">
<div className="animate-slide-up-fade relative flex w-auto flex-col items-center [--offset:10px] [animation-duration:1.3s] [animation-fill-mode:both]">