Skip to content

Commit

Permalink
chore: update site
Browse files Browse the repository at this point in the history
  • Loading branch information
pomelo-nwu committed Aug 21, 2023
1 parent 08476bd commit 254290b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
4 changes: 2 additions & 2 deletions packages/gi-site/src/components/Navbar/WorkbookNav.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as React from 'react';
import React, { memo } from 'react';
import { useHistory } from 'react-router-dom';
import { useContext } from '../../pages/Analysis/hooks/useContext';
import ProjectTitle from '../ProjectTitle';
Expand Down Expand Up @@ -72,4 +72,4 @@ const WorkbookBar: React.FunctionComponent<WorkbookBarProps> = props => {
);
};

export default WorkbookBar;
export default memo(WorkbookBar);
6 changes: 2 additions & 4 deletions packages/gi-site/src/components/Sidebar/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/* eslint-disable jsx-a11y/no-noninteractive-element-interactions */
import { AppstoreOutlined } from '@ant-design/icons';
import * as React from 'react';
import useAssetsCenter from '../AssetsCenter/useHook';
import React, { memo } from 'react';
import { getSearchParams } from '../utils';
import './index.less';
interface Option {
Expand Down Expand Up @@ -49,4 +47,4 @@ const Sidebar: React.FunctionComponent<SidebarProps> = props => {
);
};

export default Sidebar;
export default memo(Sidebar);
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { clone, isArray, difference } from '@antv/util';
import { clone, difference, isArray } from '@antv/util';
import { Button, Checkbox, Col, Row, Select, Tooltip } from 'antd';
import React, { useEffect } from 'react';
import { useImmer } from 'use-immer';
import $i18n from '../../../../i18n';
import { AssetInfo } from '../../typing';
import AssetsCenter from './AssetsCenter';
import RenderForm from './RenderForm';
import $i18n from '../../../../i18n';
import './index.less';

let refComponentKeys: string[] = [];
Expand Down Expand Up @@ -282,6 +282,7 @@ const ContainerPanel = props => {
item.props.GI_CONTAINER = containerAssetsIds;
}
});

const activeComponentKeys = new Set<string>(refComponentKeys);
if (action === 'add') {
assetList.forEach(asset => {
Expand Down
6 changes: 3 additions & 3 deletions packages/gi-site/src/pages/Analysis/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import locale from '@aligov/global-locale';
import GISDK, { useContext as useGIContext, utils } from '@antv/gi-sdk';
import { message } from 'antd';
import { original } from 'immer';
import React, { useRef, useState } from 'react';
import React, { memo, useRef, useState } from 'react';
import { Sidebar } from '../../components';
import Loading from '../../components/Loading';
import Navbar from '../../components/Navbar/WorkbookNav';
Expand Down Expand Up @@ -143,7 +143,7 @@ const Analysis = props => {
/** 将组件资产中的的 MockServices 与项目自自定义的 Services 去重处理 */
const combinedServiceConfig = getCombinedServiceConfig(mockServiceConfig, original(draft.serviceConfig));
const schemaData = original(draft.schemaData);

const activeAssetsInformation = queryActiveAssetsInformation({
engineId,
assets: activeAssets,
Expand Down Expand Up @@ -326,4 +326,4 @@ const Analysis = props => {
);
};

export default Analysis;
export default memo(Analysis);

0 comments on commit 254290b

Please sign in to comment.