import * as React from "react"; import { Light as SyntaxHighlighter } from "react-syntax-highlighter"; import js from "react-syntax-highlighter/dist/esm/languages/hljs/javascript"; import style from "react-syntax-highlighter/dist/esm/styles/hljs/atom-one-dark"; SyntaxHighlighter.registerLanguage("javascript", js); const CodeTerminal = () => { const codeString = `import { SkynetClient } from "skynet-js"; // create a client const client = new SkynetClient(); // Assume we have a file from an input form. async function example() { try { // upload const { skylink } = await client.uploadFile(file); // download await client.downloadFile(skylink); console.log('Download successful'); } catch (error) { console.log(error) } }`; return (
{codeString}
); }; CodeTerminal.propTypes = {}; CodeTerminal.defaultProps = {}; export default CodeTerminal;