Wordpress App Files cleanup (#5858)

Co-authored-by: Peer Richelsen <[email protected]>
This commit is contained in:
Hariom BalharaandPeer Richelsen authored and GitHub committed 2022-12-05 13:42:38 +00:00
1 parent 11f467af5d
commit 7a6545bd03
3 files changed
-45

No files matched your search

-1
View File
@@ -11,6 +11,5 @@
"publisher": "Cal.com, Inc.",
"email": "[email protected]",
"description": "Embedded booking pages right into your wordpress page",
"extendsFeature": "EventType",
"__createdUsingCli": true
}
@@ -1,43 +0,0 @@
import { useState } from "react";
import { useAppContextWithSchema } from "@calcom/app-store/EventTypeAppContext";
import AppCard from "@calcom/app-store/_components/AppCard";
import type { EventTypeAppCardComponent } from "@calcom/app-store/types";
import { Icon } from "@calcom/ui";
import { appDataSchema } from "../zod";
const EventTypeAppCard: EventTypeAppCardComponent = function EventTypeAppCard({ eventType, app }) {
const [getAppData, setAppData] = useAppContextWithSchema<typeof appDataSchema>();
const isSunrise = getAppData("isSunrise");
const [enabled, setEnabled] = useState(getAppData("enabled"));
return (
<AppCard
setAppData={setAppData}
app={app}
switchOnClick={(e) => {
if (!e) {
setEnabled(false);
setAppData("isSunrise", false);
} else {
setEnabled(true);
setAppData("isSunrise", true);
}
}}
switchChecked={enabled}>
<div className="mt-2 text-sm">
<div className="flex">
<span className="mr-2">{isSunrise ? <Icon.FiSunrise /> : <Icon.FiSunset />}</span>I am an AppCard
for Event with Title: {eventType.title}
</div>{" "}
<div className="mt-2">
Edit <span className="italic">packages/app-store/{app.slug}/extensions/EventTypeAppCard.tsx</span>{" "}
to play with me
</div>
</div>
</AppCard>
);
};
export default EventTypeAppCard;