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-06-22 22:25:37 +00:00
|
|
|
|
|
|
|
// Relative to prevent triggering a recompile
|
|
|
|
import pkg from "../../../../apps/web/package.json";
|
2023-01-02 19:44:51 +00:00
|
|
|
|
2023-05-23 10:42:01 +00:00
|
|
|
export const CalComVersion = `v.${pkg.version}-${!IS_SELF_HOSTED ? "h" : "sh"}`;
|
2023-01-02 19:44:51 +00:00
|
|
|
|
|
|
|
export default function Credits() {
|
|
|
|
const [hasMounted, setHasMounted] = useState(false);
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
setHasMounted(true);
|
|
|
|
}, []);
|
|
|
|
|
|
|
|
return (
|
2023-06-22 22:25:37 +00:00
|
|
|
<small className="text-default mx-3 mb-2 mt-1 hidden text-[0.5rem] opacity-50 lg:block">
|
2023-01-02 19:44:51 +00:00
|
|
|
© {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>
|
|
|
|
);
|
|
|
|
}
|