2023-01-02 19:44:51 +00:00
|
|
|
import Link from "next/link";
|
|
|
|
import { useEffect, useState } from "react";
|
|
|
|
|
2023-01-12 22:25:25 +00:00
|
|
|
import { COMPANY_NAME, IS_SELF_HOSTED } from "@calcom/lib/constants";
|
2023-01-02 19:44:51 +00:00
|
|
|
import pkg from "@calcom/web/package.json";
|
|
|
|
|
2023-01-12 22:25:25 +00:00
|
|
|
export const CalComVersion = `v.${pkg.version}-${!IS_SELF_HOSTED ? "h" : "sh"}-${
|
|
|
|
process.env.CALCOM_LICENSE_KEY === "" ? "ee" : "ce"
|
|
|
|
}`;
|
2023-01-02 19:44:51 +00:00
|
|
|
|
|
|
|
export default function Credits() {
|
|
|
|
const [hasMounted, setHasMounted] = useState(false);
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
setHasMounted(true);
|
|
|
|
}, []);
|
|
|
|
|
|
|
|
return (
|
|
|
|
<small className="mx-3 mt-1 mb-2 hidden text-[0.5rem] opacity-50 lg:block">
|
|
|
|
© {new Date().getFullYear()}{" "}
|
2023-01-06 12:13:56 +00:00
|
|
|
<Link href="https://go.cal.com/credits" target="_blank" className="hover:underline">
|
|
|
|
{COMPANY_NAME}
|
2023-01-02 19:44:51 +00:00
|
|
|
</Link>{" "}
|
|
|
|
{hasMounted && (
|
2023-01-06 12:13:56 +00:00
|
|
|
<Link href="https://go.cal.com/releases" target="_blank" className="hover:underline">
|
|
|
|
{CalComVersion}
|
2023-01-02 19:44:51 +00:00
|
|
|
</Link>
|
|
|
|
)}
|
|
|
|
</small>
|
|
|
|
);
|
|
|
|
}
|