chore: heygermany customer project
Some checks failed
Main / Setup and Test (push) Has been cancelled
Main / Build Website (push) Has been cancelled

This commit is contained in:
e2e
2026-07-11 09:36:03 +02:00
commit 1e78e21c36
398 changed files with 38345 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
import { signInWithPassword } from "@/lib/auth"
import { useMutation } from "@tanstack/react-query"
import { useParams, useRouter } from "@/framework/navigation"
export const useBackOfficeLogin = () => {
const router = useRouter()
const { lang } = useParams<{ lang?: string }>()
return useMutation({
mutationFn: async ({ email, password }: { email: string; password: string }) => {
return await signInWithPassword(email, password)
},
onSuccess: () => {
router.replace(`/${lang || 'en'}/backoffice/candidates`)
},
onError: (error) => {
console.error('BackOffice login failed:', error)
}
})
}