diff --git a/apps/web/lib/slugify.ts b/apps/web/lib/slugify.ts index c6fba1f4..f06442b7 100644 --- a/apps/web/lib/slugify.ts +++ b/apps/web/lib/slugify.ts @@ -1,5 +1,3 @@ -export const slugify = (str: string) => { - return str.replace(/[^a-zA-Z0-9-]/g, "-").toLowerCase(); -}; - -export default slugify; +// TODO: Remove this file once every `classNames` is imported from `@calcom/lib` +export * from "@calcom/lib/slugify"; +export { default } from "@calcom/lib/slugify"; diff --git a/apps/web/pages/event-types/[type].tsx b/apps/web/pages/event-types/[type].tsx index d3cf1d07..42676c17 100644 --- a/apps/web/pages/event-types/[type].tsx +++ b/apps/web/pages/event-types/[type].tsx @@ -36,9 +36,9 @@ import getIntegrations, { hasIntegration } from "@lib/integrations/getIntegratio import { LocationType } from "@lib/location"; import showToast from "@lib/notification"; import prisma from "@lib/prisma"; +import { slugify } from "@lib/slugify"; import { trpc } from "@lib/trpc"; import { inferSSRProps } from "@lib/types/inferSSRProps"; -import { slugify } from "@lib/slugify"; import DestinationCalendarSelector from "@components/DestinationCalendarSelector"; import { Dialog, DialogContent, DialogTrigger } from "@components/Dialog"; @@ -254,7 +254,7 @@ const EventTypePage = (props: inferSSRProps) => { {...locationFormMethods.register("locationAddress")} id="address" required - className="block w-full border-gray-300 rounded-sm shadow-sm focus:border-primary-500 focus:ring-primary-500 sm:text-sm" + className="focus:border-primary-500 focus:ring-primary-500 block w-full rounded-sm border-gray-300 shadow-sm sm:text-sm" defaultValue={ formMethods .getValues("locations") @@ -384,7 +384,7 @@ const EventTypePage = (props: inferSSRProps) => { options={locationOptions} isSearchable={false} classNamePrefix="react-select" - className="flex-1 block w-full min-w-0 border border-gray-300 rounded-sm react-select-container focus:border-primary-500 focus:ring-primary-500 sm:text-sm" + className="react-select-container focus:border-primary-500 focus:ring-primary-500 block w-full min-w-0 flex-1 rounded-sm border border-gray-300 sm:text-sm" onChange={(e) => { if (e?.value) { locationFormMethods.setValue("locationType", e.value); @@ -402,25 +402,25 @@ const EventTypePage = (props: inferSSRProps) => { className="mb-2 rounded-sm border border-neutral-300 py-1.5 px-2 shadow-sm">
{location.type === LocationType.InPerson && ( -
- +
+
)} {location.type === LocationType.Phone && ( -
- +
+ {t("phone_call")}
)} {location.type === LocationType.GoogleMeet && ( -
+
@@ -449,7 +449,7 @@ const EventTypePage = (props: inferSSRProps) => {
)} {location.type === LocationType.Huddle01 && ( -
+
) => {
)} {location.type === LocationType.Zoom && ( -
+
@@ -549,7 +549,7 @@ const EventTypePage = (props: inferSSRProps) => {
)} {location.type === LocationType.Tandem && ( -
+
) => {
)} {location.type === LocationType.Jitsi && ( -
+
@@ -603,11 +603,11 @@ const EventTypePage = (props: inferSSRProps) => {
@@ -618,7 +618,7 @@ const EventTypePage = (props: inferSSRProps) => {
  • @@ -1050,8 +1049,8 @@ const EventTypePage = (props: inferSSRProps) => { )} /> -
    -
    +
    +
    @@ -1076,7 +1075,7 @@ const EventTypePage = (props: inferSSRProps) => { @@ -1176,7 +1175,7 @@ const EventTypePage = (props: inferSSRProps) => {
    -
    +
    @@ -1213,20 +1212,20 @@ const EventTypePage = (props: inferSSRProps) => { <>
    -
    +
    -
    +
    -
    +
    { setRequirePayment(event.target.checked); @@ -1237,7 +1236,7 @@ const EventTypePage = (props: inferSSRProps) => { id="requirePayment" name="requirePayment" type="checkbox" - className="w-4 h-4 border-gray-300 rounded text-primary-600 focus:ring-primary-500" + className="text-primary-600 focus:ring-primary-500 h-4 w-4 rounded border-gray-300" defaultChecked={requirePayment} />
    @@ -1260,7 +1259,7 @@ const EventTypePage = (props: inferSSRProps) => {
    {requirePayment && (
    -
    +
    ) => { min="0.5" type="number" required - className="block w-full pl-2 pr-12 border-gray-300 rounded-sm focus:border-primary-500 focus:ring-primary-500 sm:text-sm" + className="focus:border-primary-500 focus:ring-primary-500 block w-full rounded-sm border-gray-300 pl-2 pr-12 sm:text-sm" placeholder="Price" onChange={(e) => { field.onChange(e.target.valueAsNumber * 100); @@ -1283,7 +1282,7 @@ const EventTypePage = (props: inferSSRProps) => { /> )} /> -
    +
    {new Intl.NumberFormat("en", { style: "currency", @@ -1308,7 +1307,7 @@ const EventTypePage = (props: inferSSRProps) => { {/* )} */} -
    +
    @@ -1341,8 +1340,8 @@ const EventTypePage = (props: inferSSRProps) => { href={permalink} target="_blank" rel="noreferrer" - className="inline-flex items-center px-2 py-1 text-sm font-medium rounded-sm text-md text-neutral-700 hover:bg-gray-200 hover:text-gray-900"> -
    -
    +
    -
    - +
    +