10 lines
239 B
TypeScript
10 lines
239 B
TypeScript
import { useCompatSearchParams } from "@calcom/lib/hooks/useCompatSearchParams";
|
|
|
|
export function useToggleQuery(name: string) {
|
|
const searchParams = useCompatSearchParams();
|
|
|
|
return {
|
|
isOn: searchParams?.get(name) === "1",
|
|
};
|
|
}
|