Skip to content

Commit

Permalink
refactor(12618): refactor typing of CleanControl
Browse files Browse the repository at this point in the history
  • Loading branch information
nattallius committed May 31, 2024
1 parent d23fc2d commit dc8f8e8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
7 changes: 1 addition & 6 deletions src/components/Layer/EraseControl/CleanControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,7 @@ import type {
LogicalLayerState,
} from '~core/logical_layers/types/logicalLayer';

export function CleanControl({
layerActions,
}: {
layerState: LogicalLayerState;
layerActions: LogicalLayerActions;
}) {
export function CleanControl({ layerActions }: { layerActions: LogicalLayerActions }) {
const cleanLayer = useCallback(
async function () {
if (layerActions?.clean) {
Expand Down
6 changes: 1 addition & 5 deletions src/components/Layer/useControlElements.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,7 @@ export function useControlElements({
layerState?.id === REFERENCE_AREA_LOGICAL_LAYER_ID
) {
elements.push(
<CleanControl
layerState={layerState}
layerActions={layerActions}
key={layerState.id + 'clean'}
/>,
<CleanControl layerActions={layerActions} key={layerState.id + 'clean'} />,
);
}
if (
Expand Down

0 comments on commit dc8f8e8

Please sign in to comment.