liuxiran commented on a change in pull request #991:
URL: https://github.com/apache/apisix-dashboard/pull/991#discussion_r545536336



##########
File path: web/src/pages/Route/List.tsx
##########
@@ -23,12 +23,31 @@ import { PlusOutlined } from '@ant-design/icons';
 
 import { timestampToLocaleString } from '@/helpers';
 
-import { fetchList, remove } from './service';
+import { fetchList, remove, updateRouteStatus } from './service';
 
 const Page: React.FC = () => {
   const ref = useRef<ActionType>();
   const { formatMessage } = useIntl();
 
+  const handleTableActionSuccessResponse = (msgTip: string) => {
+    notification.success({
+      message: msgTip,
+    });
+
+    ref.current?.reload();
+  };
+
+  const handlePublishOffline = (rid: string, status: RouteModule.RouteStatus) 
=> {
+    updateRouteStatus(rid, status).then(() => {
+      const actionName = status? formatMessage({ id: 'page.route.publish' }) : 
formatMessage({ id: 'page.route.offline' })

Review comment:
       need a space before `?` right? 
   fixed, thanks




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to