Wordpress App Files cleanup (#5858)
Co-authored-by: Peer Richelsen <peeroke@gmail.com>pull/5866/head^2
parent
11f467af5d
commit
7a6545bd03
|
@ -38,5 +38,4 @@ export const EventTypeAddonMap = {
|
||||||
qr_code: dynamic(() => import("./qr_code/extensions/EventTypeAppCard")),
|
qr_code: dynamic(() => import("./qr_code/extensions/EventTypeAppCard")),
|
||||||
rainbow: dynamic(() => import("./rainbow/extensions/EventTypeAppCard")),
|
rainbow: dynamic(() => import("./rainbow/extensions/EventTypeAppCard")),
|
||||||
stripepayment: dynamic(() => import("./stripepayment/extensions/EventTypeAppCard")),
|
stripepayment: dynamic(() => import("./stripepayment/extensions/EventTypeAppCard")),
|
||||||
wordpress: dynamic(() => import("./wordpress/extensions/EventTypeAppCard")),
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -11,6 +11,5 @@
|
||||||
"publisher": "Cal.com, Inc.",
|
"publisher": "Cal.com, Inc.",
|
||||||
"email": "support@cal.com",
|
"email": "support@cal.com",
|
||||||
"description": "Embedded booking pages right into your wordpress page",
|
"description": "Embedded booking pages right into your wordpress page",
|
||||||
"extendsFeature": "EventType",
|
|
||||||
"__createdUsingCli": true
|
"__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;
|
|
Loading…
Reference in New Issue