Skip to content

Commit

Permalink
fix(lde): errors on page re-render (#3323)
Browse files Browse the repository at this point in the history
Co-authored-by: Ansh Goyal <[email protected]>
  • Loading branch information
bandantonio and anshgoyalevil authored Nov 30, 2024
1 parent 1335d22 commit 391482d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/MDX/MDX.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { MDXProvider as CoreMDXProvider } from '@mdx-js/react';
import mermaid from 'mermaid';
import Link from 'next/link';
import React, { useLayoutEffect, useState } from 'react';
import React, { useEffect, useState } from 'react';
import {
TwitterDMButton,
TwitterFollowButton,
Expand Down Expand Up @@ -97,7 +97,7 @@ function MermaidDiagram({ graph }: MermaidDiagramProps) {
/**
* @description Renders the Mermaid diagram.
*/
useLayoutEffect(() => {
useEffect(() => {
if (!graph) {
return;
}
Expand Down

0 comments on commit 391482d

Please sign in to comment.