-
-
- SIGN IN WITH
-
-
+
+ {/* Divider */}
+
-
-
+
+
+
);
diff --git a/components/login/social-login/SocialLoginButton.tsx b/components/login/social-login/SocialLoginButton.tsx
index 5096a36f032..4c61b6177f9 100644
--- a/components/login/social-login/SocialLoginButton.tsx
+++ b/components/login/social-login/SocialLoginButton.tsx
@@ -6,17 +6,17 @@ function SocialLoginButton({ name, image, onClick }: { name: string; image: stri
return (
);
}
diff --git a/components/toolbox/components/ui/dialog.tsx b/components/toolbox/components/ui/dialog.tsx
index 427289ff740..56def46e847 100644
--- a/components/toolbox/components/ui/dialog.tsx
+++ b/components/toolbox/components/ui/dialog.tsx
@@ -1,6 +1,7 @@
import React, { useEffect } from 'react';
import * as RadixDialog from "@radix-ui/react-dialog";
import { X } from 'lucide-react';
+import { cn } from '@/lib/cn';
// Custom Dialog Root component that handles pointer-events cleanup
interface DialogRootProps {
@@ -59,12 +60,15 @@ interface DialogContentProps extends React.ComponentProps
= ({
children,
showCloseButton = true,
- className = "",
+ className,
...props
}) => {
return (
{children}
@@ -92,12 +96,12 @@ export const DialogOverlay: React.FC> = ({
- className = "",
+ className,
...props
}) => {
return (
);
diff --git a/hooks/useLoginModal.ts b/hooks/useLoginModal.ts
new file mode 100644
index 00000000000..56f87b4f40d
--- /dev/null
+++ b/hooks/useLoginModal.ts
@@ -0,0 +1,64 @@
+'use client';
+
+import { useState, useCallback } from 'react';
+
+interface LoginModalState {
+ isOpen: boolean;
+ callbackUrl?: string;
+}
+
+let globalLoginModalState: LoginModalState = {
+ isOpen: false,
+ callbackUrl: undefined,
+};
+
+const loginModalListeners = new Set<() => void>();
+
+const notifyLoginModalChange = () => {
+ loginModalListeners.forEach(listener => listener());
+};
+
+// Hook for components that need to trigger the login modal
+export function useLoginModalTrigger() {
+ const openLoginModal = useCallback((callbackUrl?: string) => {
+ globalLoginModalState = {
+ isOpen: true,
+ callbackUrl,
+ };
+ notifyLoginModalChange();
+ }, []);
+
+ return {
+ openLoginModal,
+ };
+}
+
+// Hook for the LoginModal component to manage its state
+export function useLoginModalState() {
+ const [, forceUpdate] = useState({});
+
+ // Subscribe to modal state changes
+ const subscribeToChanges = useCallback(() => {
+ const listener = () => forceUpdate({});
+ loginModalListeners.add(listener);
+ return () => {
+ loginModalListeners.delete(listener);
+ };
+ }, []);
+
+ const closeLoginModal = useCallback(() => {
+ globalLoginModalState = {
+ isOpen: false,
+ callbackUrl: undefined,
+ };
+ notifyLoginModalChange();
+ }, []);
+
+ return {
+ isOpen: globalLoginModalState.isOpen,
+ callbackUrl: globalLoginModalState.callbackUrl,
+ closeLoginModal,
+ subscribeToChanges,
+ };
+}
+
diff --git a/public/brands/github.svg b/public/brands/github.svg
new file mode 100644
index 00000000000..9d3891a8f97
--- /dev/null
+++ b/public/brands/github.svg
@@ -0,0 +1,4 @@
+
+
diff --git a/public/brands/google.svg b/public/brands/google.svg
new file mode 100644
index 00000000000..fb4871514f4
--- /dev/null
+++ b/public/brands/google.svg
@@ -0,0 +1,7 @@
+
+
diff --git a/public/brands/x.svg b/public/brands/x.svg
new file mode 100644
index 00000000000..e9d4f684652
--- /dev/null
+++ b/public/brands/x.svg
@@ -0,0 +1,4 @@
+
+