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,10 @@
import { ApplicationCandidateData } from "@heygermany/sdk"
import { useForm } from "react-hook-form"
export const useCandidateForm = (candidate: ApplicationCandidateData) => {
const methods = useForm<ApplicationCandidateData>({
defaultValues: candidate,
})
return methods
}

View File

@@ -0,0 +1,18 @@
import { pikku } from '@/pikku/http'
import type { ApplicationCandidateData } from '@heygermany/sdk'
import { useQuery } from '@tanstack/react-query'
export const useGetCandidate = (candidateId?: string) => {
return useQuery({
queryKey: ['candidate'],
queryFn: async (): Promise<ApplicationCandidateData> => {
if (!candidateId) {
return await pikku().get('/candidate')
} else {
return await pikku().get('/candidate/:candidateId', { candidateId })
}
},
staleTime: 5 * 60 * 1000, // 5 minutes,
retry: 0
})
}