everything works with sending request and ccreating relationship

This commit is contained in:
talksik
2022-03-19 23:07:09 -04:00
parent 0faacbab73
commit 795a15cc0f
3 changed files with 4 additions and 10 deletions
+3 -7
View File
@@ -52,8 +52,11 @@ const sendContactRequest = async (
idToken: string,
otherUserGoogleId: string
) => {
console.log(idToken);
const response = await axios.post(
localHost + `/contacts/${otherUserGoogleId}`,
null,
{
headers: { Authorization: idToken },
}
@@ -103,13 +106,6 @@ export function useConversationDetails(otherUserGoogleId: string) {
}
// =========== MUTATIONS
export function useCreateUser() {
return useMutation(nirvanaApi.user.createUser, {
onSettled: (data, error) => {
return queryClient.invalidateQueries(Querytypes.GET_USER_DETAILS);
},
});
}
export function useSendContactRequest() {
const authTokens = useRecoilValue($authTokens);