Просмотр исходного кода

change to arrow function inside onClick blocks

kaoritokashiki 5 лет назад
Родитель
Сommit
cb35023c89
1 измененных файлов с 4 добавлено и 4 удалено
  1. 4 4
      src/client/js/components/TopOfTableContents.jsx

+ 4 - 4
src/client/js/components/TopOfTableContents.jsx

@@ -43,19 +43,19 @@ const TopOfTableContents = (props) => {
   return (
     <>
       <div className="top-of-table-contents d-flex align-items-end pb-1">
-        <button type="button" className="bg-transparent border-0" onClick={openPageAccessoriesModal('pageList')}>
+        <button type="button" className="bg-transparent border-0" onClick={() => openPageAccessoriesModal('pageList')}>
           <PageList />
         </button>
 
-        <button type="button" className="bg-transparent border-0 active" onClick={openPageAccessoriesModal('timeLine')}>
+        <button type="button" className="bg-transparent border-0 active" onClick={() => openPageAccessoriesModal('timeLine')}>
           <TimeLine />
         </button>
 
-        <button type="button" className="bg-transparent border-0" onClick={openPageAccessoriesModal('recentChanges')}>
+        <button type="button" className="bg-transparent border-0" onClick={() => openPageAccessoriesModal('recentChanges')}>
           <RecentChanges />
         </button>
 
-        <button type="button" className="bg-transparent border-0" onClick={openPageAccessoriesModal('attachment')}>
+        <button type="button" className="bg-transparent border-0" onClick={() => openPageAccessoriesModal('attachment')}>
           <Attachment />
         </button>
         {/* [TODO: setting Footprints' icon by GW-3308] */}