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.

remove the unused props

Kiran K4b248d51a9cd
diff --git a/apps/web/app/app.dub.co/(auth)/login/page.tsx b/apps/web/app/app.dub.co/(auth)/login/page.tsx
index 72707ec1c2..b9980ea327 100644
--- a/apps/web/app/app.dub.co/(auth)/login/page.tsx
+++ b/apps/web/app/app.dub.co/(auth)/login/page.tsx
@@ -33,7 +33,7 @@ export default function LoginPage() {
</>
}
>
- <SignInWithEmailPassword csrfToken="" />
+ <SignInWithEmailPassword />
<div className="border-t border-gray-300" />
<LoginForm />
</Suspense>
diff --git a/apps/web/app/app.dub.co/(auth)/login/signin-email-password.tsx b/apps/web/app/app.dub.co/(auth)/login/signin-email-password.tsx
index 4e193cef14..0456eee9ba 100644
--- a/apps/web/app/app.dub.co/(auth)/login/signin-email-password.tsx
+++ b/apps/web/app/app.dub.co/(auth)/login/signin-email-password.tsx
@@ -8,18 +8,12 @@ import { useRouter, useSearchParams } from "next/navigation";
import { useForm } from "react-hook-form";
import { toast } from "sonner";
-interface SignInWithEmailPasswordProps {
- csrfToken: string;
-}
-
const errorCodes = {
"no-credentials": "Please provide an email and password.",
"invalid-credentials": "Email or password is incorrect.",
};
-export const SignInWithEmailPassword = ({
- csrfToken,
-}: SignInWithEmailPasswordProps) => {
+export const SignInWithEmailPassword = () => {
const router = useRouter();
const searchParams = useSearchParams();
@@ -35,7 +29,6 @@ export const SignInWithEmailPassword = ({
try {
const response = await signIn("credentials", {
...data,
- csrfToken,
redirect: false,
callbackUrl: searchParams.get("next") || "/",
});