Changeset View
Changeset View
Standalone View
Standalone View
web/e.cash_v2/app/components/Atoms/CodeSnippet.tsx
- This file was moved from web/e.cash_v2/app/components/CodeSnippet.tsx.
| // Copyright (c) 2025 The Bitcoin developers | // Copyright (c) 2025 The Bitcoin developers | ||||
| // Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
| // file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
| "use client"; | "use client"; | ||||
| import { useState } from "react"; | import { useState } from "react"; | ||||
| import { cn } from "../utils/cn"; | import { cn } from "../../utils/cn"; | ||||
| import { Prism as SyntaxHighlighter } from "react-syntax-highlighter"; | import { Prism as SyntaxHighlighter } from "react-syntax-highlighter"; | ||||
| import { oneDark } from "react-syntax-highlighter/dist/cjs/styles/prism"; | import { oneDark } from "react-syntax-highlighter/dist/cjs/styles/prism"; | ||||
| const snippets: Record<string, string> = { | const snippets: Record<string, string> = { | ||||
| "chronik-init.ts": `// Initialize a Chronik client for eCash | "chronik-init.ts": `// Initialize a Chronik client for eCash | ||||
| import Chronik from 'chronik-client' | import Chronik from 'chronik-client' | ||||
| // Point to a public Chronik endpoint (mainnet) | // Point to a public Chronik endpoint (mainnet) | ||||
| ▲ Show 20 Lines • Show All 109 Lines • Show Last 20 Lines | |||||