mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-21 18:13:29 +00:00
19 lines
430 B
TypeScript
19 lines
430 B
TypeScript
'use client';
|
|
|
|
import React from 'react';
|
|
|
|
import type { MathJaXFormulaProps } from './MathJaX';
|
|
|
|
const MathJaXFormula = React.lazy(() => import('./MathJaX'));
|
|
|
|
/**
|
|
* Lazy component that loads MathJax and renders the formula.
|
|
*/
|
|
export function MathJaXLazy(props: MathJaXFormulaProps) {
|
|
return (
|
|
<React.Suspense fallback={props.fallback}>
|
|
<MathJaXFormula {...props} />
|
|
</React.Suspense>
|
|
);
|
|
}
|