* add a layoutfile to use-page-wrapper route group * refactor and move bookings status page to route group * improve logic in pagesAndRewritePaths * fix * add use client directive * chore: remove WithLayout from 8 low-risk single pages (#18745) * move /403 and /500 * move /auth/error * move /connect-and-join * move /enterprise * move /maintenance * move /more * move /upgrade * pass dehydratedState in layout
22 lines
524 B
TypeScript
22 lines
524 B
TypeScript
"use client";
|
|
|
|
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
|
import { Button, showToast } from "@calcom/ui";
|
|
|
|
export default function CopyButton({ error }: { error: string }) {
|
|
const { t } = useLocale();
|
|
|
|
return (
|
|
<Button
|
|
color="secondary"
|
|
className="mt-2 border-0 font-sans font-normal hover:bg-gray-300"
|
|
StartIcon="copy"
|
|
onClick={() => {
|
|
navigator.clipboard.writeText(error);
|
|
showToast("Link copied!", "success");
|
|
}}>
|
|
{t("copy")}
|
|
</Button>
|
|
);
|
|
}
|