import { DefaultButton, PrimaryButton, Spinner, Stack, Text, TextField } from "@fluentui/react"; import copyToClipboard from "clipboard-copy"; import * as React from "react"; import { useFullScreenURLs } from "../hooks/useFullScreenURLs"; export const OpenFullScreen: React.FunctionComponent = () => { const result = useFullScreenURLs(); if (!result) { return ; } const readWriteUrl = `https://cosmos.azure.com/?key=${result.readWrite}`; const readUrl = `https://cosmos.azure.com/?key=${result.read}`; return ( <> Open this database account in a new browser tab with Cosmos DB Explorer. Or copy the read-write or read only access urls below to share with others. For security purposes, the URLs grant time-bound access to the account. When access expires, you can reconnect, using a valid connection string for the account. { copyToClipboard(readWriteUrl); }} text="Copy" iconProps={{ iconName: "Copy" }} /> { window.open(readWriteUrl, "_blank"); }} text="Open" iconProps={{ iconName: "OpenInNewWindow" }} /> { copyToClipboard(readUrl); }} text="Copy" iconProps={{ iconName: "Copy" }} /> { window.open(readUrl, "_blank"); }} text="Open" iconProps={{ iconName: "OpenInNewWindow" }} /> ); };