cal.pub0.org/packages/features/users/components/UserV2OptInBanner.tsx

30 lines
740 B
TypeScript
Raw Normal View History

2022-09-05 20:25:21 +00:00
function UserV2OptInBanner() {
// Only show on client-side
if (typeof document === "undefined") return null;
const hasV2OptInCookie = document.cookie.includes("calcom-v2-early-access=1");
if (hasV2OptInCookie)
return (
<p className="text-xs text-gray-400">
You&apos;re using the new version of Cal.com.{" "}
<a href="/api/v2-opt-in" className="text-blue-400 underline">
Go back
</a>
.
</p>
2022-09-05 20:25:21 +00:00
);
return (
<p className="text-xs text-gray-400">
Want to try the new version of Cal.com?{" "}
<a href="/api/v2-opt-in" className="text-blue-400 underline">
Opt-in to our v2.0 beta
</a>
.
</p>
2022-09-05 20:25:21 +00:00
);
}
export default UserV2OptInBanner;