Google button work

This commit is contained in:
sosokker 2023-11-30 07:12:54 +07:00
parent c09592bd00
commit 243e43dbcc
2 changed files with 10 additions and 4 deletions

View File

@ -1,4 +1,5 @@
import { readTodoTasks } from "src/api/TaskApi"; import { readTodoTasks } from "src/api/TaskApi";
import { axiosInstance } from "src/api/AxiosConfig";
let eventGuid = 0; let eventGuid = 0;

View File

@ -13,6 +13,14 @@ export class Calendar extends React.Component {
currentEvents: [], currentEvents: [],
}; };
async handleGoogleClick() {
try {
const response = await axiosInstance.get("calendar-events/");
} catch (error) {
console.error("Error fetching data from Google:", error);
}
}
render() { render() {
return ( return (
<div className="flex font-sans w-full h-screen"> <div className="flex font-sans w-full h-screen">
@ -47,10 +55,7 @@ export class Calendar extends React.Component {
<div className="w-72 bg-blue-100 border-r border-blue-200 p-8 flex flex-col"> <div className="w-72 bg-blue-100 border-r border-blue-200 p-8 flex flex-col">
{/* Description Zone */} {/* Description Zone */}
<div className="mb-8"> <div className="mb-8">
<h2 className="text-xl font-bold">Instructions</h2>
<ul className="list-disc pl-4"> <ul className="list-disc pl-4">
<li>Select dates and you will be prompted to create a new event</li>
<li>Drag, drop, and resize events</li>
<li>Click an event to delete it</li> <li>Click an event to delete it</li>
</ul> </ul>
</div> </div>
@ -66,7 +71,7 @@ export class Calendar extends React.Component {
/> />
Toggle weekends Toggle weekends
</label> </label>
<button className="btn btn-info" onClick={() => alert("Commit soon🥺")}> <button className="btn btn-info" onClick={() => this.handleGoogleClick()}>
Load Data from Google Load Data from Google
</button> </button>
</div> </div>