diff --git a/apps/webapp/app/components/CopyText.tsx b/apps/webapp/app/components/CopyText.tsx new file mode 100644 index 000000000..5f3ac68aa --- /dev/null +++ b/apps/webapp/app/components/CopyText.tsx @@ -0,0 +1,28 @@ +import React, { useCallback } from "react"; + +export type CopyTextProps = { + children?: React.ReactNode; + value: string; + className?: string; + onCopied?: () => void; +}; + +export function CopyText({ + children, + value, + className, + onCopied, +}: CopyTextProps) { + const onClick = useCallback(() => { + navigator.clipboard.writeText(value); + if (onCopied) { + onCopied(); + } + }, [value, onCopied]); + + return ( +
+ View every single API request and response in real-time from your + dashboard. +
++ Get less than 10ms response times. +
++ Avoid annoying rate limits by enabling caching – while also saving + money. +
++ We deal with CORS issues for you. +
++ Get alerts when issues arise and debug them using our inline help + prompts. +
++ By logging in with your email you agree to our{" "} + + terms + {" "} + and{" "} + + privacy + {" "} + policies. +
++ By connecting your GitHub account you agree to our{" "} + + terms + {" "} + and{" "} + + privacy + {" "} + policies. +
+