jam411 3 лет назад
Родитель
Сommit
ac0ed4444a
1 измененных файлов с 22 добавлено и 23 удалено
  1. 22 23
      packages/app/src/components/Admin/PluginsExtension/PluginCard.tsx

+ 22 - 23
packages/app/src/components/Admin/PluginsExtension/PluginCard.tsx

@@ -1,32 +1,10 @@
 
-import { useState } from 'react';
+import React, { useState } from 'react';
 
 import Link from 'next/link';
 
 import styles from './PluginCard.module.scss';
 
-const PluginCardButton = ({ onChange }: any): JSX.Element => {
-  const [isEnabled, setIsEnabled] = useState(true);
-
-  return (
-    <div className={`${styles.plugin_card}`}>
-      <div className="switch">
-        <label className="switch__label">
-          <input
-            type="checkbox"
-            className="switch__input"
-            onChange={() => setIsEnabled(!isEnabled)}
-            checked={isEnabled}
-          />
-          <span className="switch__content"></span>
-          <span className="switch__circle"></span>
-        </label>
-      </div>
-    </div>
-  );
-};
-
-
 type Props = {
   name: string,
   url: string,
@@ -38,6 +16,27 @@ export const PluginCard = (props: Props): JSX.Element => {
     name, url, description,
   } = props;
 
+  const PluginCardButton = (): JSX.Element => {
+    const [isEnabled, setIsEnabled] = useState(true);
+
+    return (
+      <div className={`${styles.plugin_card}`}>
+        <div className="switch">
+          <label className="switch__label">
+            <input
+              type="checkbox"
+              className="switch__input"
+              onChange={() => setIsEnabled(!isEnabled)}
+              checked={isEnabled}
+            />
+            <span className="switch__content"></span>
+            <span className="switch__circle"></span>
+          </label>
+        </div>
+      </div>
+    );
+  };
+
   return (
     <div className="card shadow border-0" key={name}>
       <div className="card-body px-5 py-4 mt-3">