Add Event to the google calender

mohsinalisoomro

MOHSIN ALI SOOMRO

Posted on October 28, 2021

Add Event to the google calender
import makeUrl from "add-event-to-calendar";

export default function App() {
  const sendEventToCalender = () => {
    const event = makeUrl({
      name: `Event name`,
      location: "Event location",
      details: `Event details`,
      startsAt: new Date().toString(),
      endsAt: new Date().toString()
    });
    console.log(event);
    window.open(event.google, "_blank");
  };

  return (
    <div className="App">
      <h1>Hello CodeSandbox</h1>
      <h2>Start editing to see some magic happen!</h2>
      <button onClick={sendEventToCalender}>Make urls</button>
    </div>
  );
}

Enter fullscreen mode Exit fullscreen mode

👉 codesandbox

💖 💪 🙅 🚩
mohsinalisoomro
MOHSIN ALI SOOMRO

Posted on October 28, 2021

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

What was your win this week?
weeklyretro What was your win this week?

November 29, 2024

Where GitOps Meets ClickOps
devops Where GitOps Meets ClickOps

November 29, 2024