Skip to content

Commit

Permalink
added comment to useLayoutEffect hook
Browse files Browse the repository at this point in the history
  • Loading branch information
devilkiller-ag committed Apr 7, 2024
1 parent acd4974 commit 1ef0b9d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions components/MDX.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ interface MermaidDiagramProps {
function MermaidDiagram({ graph }: MermaidDiagramProps) {
const [svg, setSvg] = useState<string | null>(null);

/**
* @description Renders the Mermaid diagram.
*/
useLayoutEffect(() => {
if (!graph) {
return;
Expand Down

0 comments on commit 1ef0b9d

Please sign in to comment.