Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
yxh01132861 committed Nov 27, 2023
1 parent 8b085b2 commit 41273a8
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions packages/li-p2/src/LayerAttribute/IconImageLayerStyle/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import IconScaleSelector from '../components/IconScaleSelector';
import { CLS_PREFIX } from './constant';
import { iconImageLayerStyleConfigToFlat, iconImageLayerStyleFlatToConfig } from './helper';
import schema from './schema';
import type { IconImageLayerStyleAttributeProps, IconSelectOptionType } from './types';
import type { IconImageLayerStyleAttributeProps } from './types';

export const IconImageLayerStyleAttributeSchemaField: React.FC<
Pick<IconImageLayerStyleAttributeProps, 'fieldList'> & { iconList?: IconSelectOptionType[] }
> = (props) => {
export const IconImageLayerStyleAttributeSchemaField: React.FC<Pick<IconImageLayerStyleAttributeProps, 'fieldList'>> = (
props,
) => {
const SchemaField = useMemo(
() =>
createSchemaField({
Expand All @@ -37,10 +37,7 @@ export const IconImageLayerStyleAttributeSchemaField: React.FC<
[],
);

const _schema = useMemo(() => schema({ fieldList: props.fieldList, iconList: props.iconList || [] }), [
props.fieldList,
props.iconList,
]);
const _schema = useMemo(() => schema({ fieldList: props.fieldList }), [props.fieldList]);

return <SchemaField schema={_schema} />;
};
Expand Down

0 comments on commit 41273a8

Please sign in to comment.