master
alex 2024-01-14 11:11:12 +01:00
parent 117f1889a6
commit 03bcd07341
1 changed files with 13 additions and 3 deletions

View File

@ -1,7 +1,7 @@
import { Button } from "antd";
import { useTranslation } from "react-i18next";
import { Constants } from "../../../utils";
import * as hello from "hellojs";
import hello from "hellojs";
import { useEffect } from "react";
export default function StoreCalendar() {
@ -32,10 +32,20 @@ export default function StoreCalendar() {
<Button
onClick={() => {
hello("google")
.login()
.login(
{
scope: "https://www.googleapis.com/auth/calendar",
},
(e) => {
console.log("login error", e);
}
)
.then(
() => {
console.log("login success");
console.log("Login successful");
var accessToken =
hello("google").getAuthResponse().access_token;
console.log("Access token: " + accessToken);
},
(e) => {
console.log("login error", e);