Skip to content

Commit eae2d5b

Browse files
committed
prettier write
1 parent 8fe79d2 commit eae2d5b

File tree

3 files changed

+18
-11
lines changed

3 files changed

+18
-11
lines changed

packages/redux-devtools-inspector-monitor/src/ActionPreview.tsx

+14-8
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,8 @@ class ActionPreview<S, A extends Action<string>> extends Component<
208208
])
209209
}
210210
>
211-
{'(pin)'}
212-
</span>
211+
{'(pin)'}
212+
</span>
213213
<span
214214
css={(theme) => ({
215215
fontSize: '0.7em',
@@ -220,13 +220,19 @@ class ActionPreview<S, A extends Action<string>> extends Component<
220220
},
221221
color: theme.PIN_COLOR,
222222
})}
223-
onClick={event => {
223+
onClick={(event) => {
224224
event.stopPropagation();
225225
let objectForCopying;
226226
if (this.props.tabName === 'Action') {
227-
objectForCopying = getValueByPath(this.props.action, reversedPath);
227+
objectForCopying = getValueByPath(
228+
this.props.action,
229+
reversedPath,
230+
);
228231
} else if (this.props.tabName === 'State') {
229-
objectForCopying = getValueByPath(this.props.nextState, reversedPath);
232+
objectForCopying = getValueByPath(
233+
this.props.nextState,
234+
reversedPath,
235+
);
230236
}
231237
if (objectForCopying !== undefined) {
232238
copyToClipboard(objectForCopying);
@@ -235,10 +241,10 @@ class ActionPreview<S, A extends Action<string>> extends Component<
235241
}
236242
}}
237243
>
238-
{'(copy)'}
239-
</span>
244+
{'(copy)'}
245+
</span>
240246
{!expanded && ': '}
241-
</span>
247+
</span>
242248
);
243249
};
244250
}

packages/redux-devtools-inspector-monitor/src/utils/copyToClipboard.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import cloneDeep from 'lodash.clonedeep';
22

3-
export function copyToClipboard(object: any){
3+
export function copyToClipboard(object: any) {
44
try {
55
const deepCopiedObject = cloneDeep(object);
66
const jsonString = JSON.stringify(deepCopiedObject, null, 2);

packages/redux-devtools-inspector-monitor/src/utils/getValueByPath.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
export function getValueByPath(obj: any, path: (string | number)[]){
1+
export function getValueByPath(obj: any, path: (string | number)[]) {
22
let current: any = obj;
33
for (let i = 0; i < path.length; i++) {
44
const key = path[i];
5-
const adjustedKey = typeof key === 'string' && !isNaN(Number(key)) ? parseInt(key, 10) : key;
5+
const adjustedKey =
6+
typeof key === 'string' && !isNaN(Number(key)) ? parseInt(key, 10) : key;
67
if (current[adjustedKey] === undefined) {
78
return undefined;
89
}

0 commit comments

Comments
 (0)