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

Moved constants to the outside of the component

Taichi Masuyama 4 лет назад
Родитель
Сommit
683faf08a3

+ 11 - 11
packages/app/src/components/Admin/SlackIntegration/ManageCommandsProcess.jsx

@@ -8,23 +8,23 @@ import { toastSuccess, toastError } from '../../../client/util/apiNotification';
 
 const logger = loggerFactory('growi:SlackIntegration:ManageCommandsProcess');
 
+const PermissionTypes = {
+  ALLOW_ALL: 'allowAll',
+  DENY_ALL: 'denyAll',
+  ALLOW_SPECIFIED: 'allowSpecified',
+};
+
+const CommandUsageTypes = {
+  BROADCAST_USE: 'broadcastUse',
+  SINGLE_USE: 'singleUse',
+};
+
 // TODO: Add permittedChannelsForEachCommand to use data from server (props must have it) GW-7006
 const ManageCommandsProcess = ({
   apiv3Put, slackAppIntegrationId, permissionsForBroadcastUseCommands, permissionsForSingleUseCommands,
 }) => {
   const { t } = useTranslation();
 
-  const PermissionTypes = {
-    ALLOW_ALL: 'allowAll',
-    DENY_ALL: 'denyAll',
-    ALLOW_SPECIFIED: 'allowSpecified',
-  };
-
-  const CommandUsageTypes = {
-    BROADCAST_USE: 'broadcastUse',
-    SINGLE_USE: 'singleUse',
-  };
-
   // TODO: use data from server GW-7006
   const [permissionsForBroadcastUseCommandsState, setPermissionsForBroadcastUseCommandsState] = useState({
     search: true,