Browse Source

use node rest

ryoji-s 2 years ago
parent
commit
edffbb867d
1 changed files with 3 additions and 1 deletions
  1. 3 1
      apps/app/src/components/ReactMarkdownComponents/LightBox.tsx

+ 3 - 1
apps/app/src/components/ReactMarkdownComponents/LightBox.tsx

@@ -4,9 +4,11 @@ import FsLightbox from 'fslightbox-react';
 
 
 export const LightBox = (props) => {
 export const LightBox = (props) => {
   const [toggler, setToggler] = useState(false);
   const [toggler, setToggler] = useState(false);
+  const { node, ...rest } = props;
+
   return (
   return (
     <>
     <>
-      <img {...props.node.properties} onClick={() => setToggler(!toggler)} />
+      <img {...rest} onClick={() => setToggler(!toggler)} />
       <FsLightbox
       <FsLightbox
         toggler={toggler}
         toggler={toggler}
         sources={[props.src]}
         sources={[props.src]}