Next.js website for Rocky Mountain Vending company featuring: - Product catalog with Stripe integration - Service areas and parts pages - Admin dashboard with Clerk authentication - SEO optimized pages with JSON-LD structured data Co-authored-by: Cursor <cursoragent@cursor.com>
18 lines
476 B
Text
18 lines
476 B
Text
/**
|
|
* @license
|
|
* Copyright 2021 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
import {FunctionComponent} from 'preact';
|
|
|
|
import {convertMarkdownCodeSnippets} from '../../../report/renderer/api';
|
|
import {useExternalRenderer} from '../util';
|
|
|
|
export const Markdown: FunctionComponent<{text: string}> = ({text}) => {
|
|
const ref = useExternalRenderer<HTMLSpanElement>(() => {
|
|
return convertMarkdownCodeSnippets(text);
|
|
}, [text]);
|
|
|
|
return <span ref={ref}/>;
|
|
};
|