MCPcopy
hub / github.com/facebook/react / handleShare

Function handleShare

compiler/apps/playground/components/Header.tsx:44–51  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

42 };
43
44 const handleShare: () => void = () => {
45 navigator.clipboard.writeText(location.href).then(() => {
46 enqueueSnackbar('URL copied to clipboard');
47 setShowCheck(true);
48 // Show the check mark icon briefly after URL is copied
49 setTimeout(() => setShowCheck(false), 1000);
50 });
51 };
52
53 return (
54 <div className="fixed z-10 flex items-center justify-between w-screen px-5 py-3 bg-white border-b border-gray-200 h-14">

Callers

nothing calls this directly

Calls 1

thenMethod · 0.65

Tested by

no test coverage detected