Kubessandra / react-google-calendar-api

An api to manage your google calendar
MIT License
215 stars 88 forks source link

handleAuthClick() always returns undefined #86

Open M1ck0 opened 2 years ago

M1ck0 commented 2 years ago

In docs, it says that handleAuthClick() returns a promise, but it does not. I need this so that after the user approves permission for the calendar, I can load all the events. Without it, I can't know if permission is granted or not.

noblessem commented 2 years ago

In docs, it says that handleAuthClick() returns a promise, but it does not. I need this so that after the user approves permission for the calendar, I can load all the events. Without it, I can't know if permission is granted or not.

Hey bro, how u resolved this issues,cause if i getting it right handleAuthClick is not a promise anymore and i cant await for it

Kubessandra commented 2 years ago

If I'm not wrong, handleAuthClick() is now synchrone, so you don't have the need to await it anymore, if not we can make a PR to make it as a promise and return.

M1ck0 commented 2 years ago

Hey bro, how u resolved this issues,cause if i getting it right handleAuthClick is not a promise anymore and i cant await for it

No I did not. I decided to use Google's API for this task as I needed some features that this package did not have.

If I'm not wrong, handleAuthClick() is now synchrone, so you don't have the need to await it anymore, if not we can make a PR to make it as a promise and return.

I need to await it but it does not return anything. I also tried without await, still nothing.

noblessem commented 2 years ago

If I'm not wrong, handleAuthClick() is now synchrone, so you don't have the need to await it anymore, if not we can make a PR to make it as a promise and return.

I understand, but i have a case, when i click on "Create Event", but while user trying to choose his account, other method createEvent trying to work and it is faileng cause it is no gapi, if i am getting it right. So i think it will be better to return smth in case, while user choose his account and then call other methods

|

noblessem commented 2 years ago

i am trying to modify somehow handleAuth method, but it is not seems to work properly