feat(dimentorin): mentor register flow wired to API (4-step form, validation, submit, redirect pending)
This commit is contained in:
@@ -12,6 +12,7 @@ import {
|
||||
getMentors,
|
||||
getMySessions,
|
||||
postBookSession,
|
||||
postRegisterMentor,
|
||||
postSessionFeedback,
|
||||
} from '../../api/dimentorin';
|
||||
import {
|
||||
@@ -22,6 +23,7 @@ import {
|
||||
TMentorAvailability,
|
||||
TMentorDetail,
|
||||
TMentorListParams,
|
||||
TMentorRegisterRequest,
|
||||
TSessionFeedbackRequest,
|
||||
TSessionListResponse,
|
||||
} from '../../types/dimentorin';
|
||||
@@ -112,6 +114,14 @@ export const usePostSessionFeedback = (sessionId: string) => {
|
||||
});
|
||||
};
|
||||
|
||||
export const usePostRegisterMentor = () => {
|
||||
return useMutation({
|
||||
mutationKey: ['post-register-mentor'],
|
||||
mutationFn: async (payload: TMentorRegisterRequest) =>
|
||||
await postRegisterMentor(payload),
|
||||
});
|
||||
};
|
||||
|
||||
export const useGetArticles = (
|
||||
params?: TArticleListParams
|
||||
): UseQueryResult<TArticleListItem[], TResponseError> => {
|
||||
|
||||
Reference in New Issue
Block a user