Skip to content

Rewrite your app in Rust, piece by piece, checked against the original at every step. Works with TypeScript, JavaScript, Python, Go, Ruby, Java, C, PHP, C#, Kotlin, PowerShell and Swift.

256 B
Raw Blame
import CODE from '../content/home-code.json'

const MAP = CODE as Record<string, string>

export default function Hl({ code }: { code: string }) {
  const html = MAP[code]
  return html ? <span dangerouslySetInnerHTML={{ __html: html }} /> : <>{code}</>
}