mirror of
https://github.com/Mail-0/Zero.git
synced 2026-07-01 08:16:28 +00:00
Fixed: Issue #830 - Adding a secondary account now correctly redirects to the current path instead of the landing page
This commit is contained in:
@@ -13,6 +13,7 @@ import { useTranslations } from 'next-intl';
|
||||
import { Button } from '../ui/button';
|
||||
import { motion } from 'motion/react';
|
||||
import { cn } from '@/lib/utils';
|
||||
import { usePathname } from 'next/navigation'
|
||||
|
||||
export const AddConnectionDialog = ({
|
||||
children,
|
||||
@@ -25,6 +26,8 @@ export const AddConnectionDialog = ({
|
||||
}) => {
|
||||
const t = useTranslations();
|
||||
|
||||
const pathname = usePathname();
|
||||
|
||||
return (
|
||||
<Dialog onOpenChange={onOpenChange}>
|
||||
<DialogTrigger asChild>
|
||||
@@ -70,6 +73,7 @@ export const AddConnectionDialog = ({
|
||||
onClick={async () =>
|
||||
await authClient.linkSocial({
|
||||
provider: provider.providerId,
|
||||
callbackURL: pathname
|
||||
})
|
||||
}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user