* Handle date mismatch b/w schedule key and slot * Add feature ollout support
18 lines
622 B
TypeScript
18 lines
622 B
TypeScript
import { useEffect, useRef } from "react";
|
|
|
|
import { PUBLIC_QUICK_AVAILABILITY_ROLLOUT } from "@calcom/lib/constants";
|
|
|
|
import { isVisitorWithinPercentage } from "../../utils/isFeatureEnabledForVisitor";
|
|
|
|
export const useIsQuickAvailabilityCheckFeatureEnabled = () => {
|
|
const isQuickAvailabilityCheckFeatureEnabledRef = useRef(
|
|
isVisitorWithinPercentage({ percentage: PUBLIC_QUICK_AVAILABILITY_ROLLOUT })
|
|
);
|
|
|
|
useEffect(() => {
|
|
console.log("QuickAvailabilityCheck feature enabled:", isQuickAvailabilityCheckFeatureEnabledRef.current);
|
|
}, []);
|
|
|
|
return isQuickAvailabilityCheckFeatureEnabledRef.current;
|
|
};
|