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 10:52:27 +02:00
commit 6c231d1d36
370 changed files with 35571 additions and 0 deletions

View File

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