Skip to content

Commit 9324f8e

Browse files
committed
[fix]: Word spelling error
1 parent 92ba827 commit 9324f8e

File tree

2 files changed

+16
-16
lines changed
  • packages
    • base/src/page/AvailabilityZone/AvailabilityZoneWrapper
    • dms-kit/src/features/useRecentlySelectedZone

2 files changed

+16
-16
lines changed

packages/base/src/page/AvailabilityZone/AvailabilityZoneWrapper/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ const AvailabilityZoneWrapper: React.FC = () => {
5151
}
5252
};
5353
const isZoneConfigured = !!availabilityZoneOptions?.length;
54-
const isMemoriredZoneNotInOptions = useMemo(
54+
const isMemoriedZoneNotInOptions = useMemo(
5555
() =>
5656
!availabilityZoneOptions?.some((v) => v.value === availabilityZone?.uid),
5757
[availabilityZoneOptions, availabilityZone]
5858
);
59-
if (isZoneConfigured && isMemoriredZoneNotInOptions) {
59+
if (isZoneConfigured && isMemoriedZoneNotInOptions) {
6060
return (
6161
<BasicModal
6262
title={t('availabilityZone.wrapper.modalTitle')}

packages/dms-kit/src/features/useRecentlySelectedZone/index.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,18 @@ const useRecentlySelectedZone = <T extends { uid?: string; name?: string }>({
3636
setAvailabilityZone(zone);
3737
const parsedData = getStorageZoneRecord();
3838
eventEmitter.emit(EmitterKey.DMS_SYNC_CURRENT_AVAILABILITY_ZONE, zone);
39-
const currentReocrd = cloneDeep(parsedData);
40-
if (currentReocrd.some((v) => v.uid === zone.uid)) {
41-
remove(currentReocrd, (v) => v.uid === zone.uid);
39+
const currentRecord = cloneDeep(parsedData);
40+
if (currentRecord.some((v) => v.uid === zone.uid)) {
41+
remove(currentRecord, (v) => v.uid === zone.uid);
4242
}
4343

44-
currentReocrd.unshift(zone);
44+
currentRecord.unshift(zone);
4545

46-
if (currentReocrd.length > DEFAULT_MAX_SELECTED_ZONE_NUMBER) {
47-
currentReocrd.pop();
46+
if (currentRecord.length > DEFAULT_MAX_SELECTED_ZONE_NUMBER) {
47+
currentRecord.pop();
4848
}
4949

50-
setStorageRecentlySelectedZoneRecord(currentReocrd);
50+
setStorageRecentlySelectedZoneRecord(currentRecord);
5151
},
5252
[
5353
setAvailabilityZone,
@@ -61,13 +61,13 @@ const useRecentlySelectedZone = <T extends { uid?: string; name?: string }>({
6161
const parsedData = getStorageZoneRecord();
6262
if (!zoneTips?.some((v) => v.uid === availabilityZone?.uid)) {
6363
setAvailabilityZone(undefined);
64-
const currentReocrd = cloneDeep(parsedData);
65-
currentReocrd.forEach((i) => {
64+
const currentRecord = cloneDeep(parsedData);
65+
currentRecord.forEach((i) => {
6666
if (i.uid === availabilityZone?.uid) {
67-
remove(currentReocrd, (v) => v.uid === i.uid);
67+
remove(currentRecord, (v) => v.uid === i.uid);
6868
}
6969
});
70-
setStorageRecentlySelectedZoneRecord(currentReocrd);
70+
setStorageRecentlySelectedZoneRecord(currentRecord);
7171
}
7272

7373
// 如果当前选择的区域在已配置的区域中存在,但是name不相同,则更新name
@@ -78,13 +78,13 @@ const useRecentlySelectedZone = <T extends { uid?: string; name?: string }>({
7878
)
7979
) {
8080
const name = zoneTips.find((v) => v.uid === availabilityZone?.uid)?.name;
81-
const currentReocrd = cloneDeep(parsedData);
82-
currentReocrd.forEach((i) => {
81+
const currentRecord = cloneDeep(parsedData);
82+
currentRecord.forEach((i) => {
8383
if (i.uid === availabilityZone?.uid) {
8484
i.name = name;
8585
}
8686
});
87-
setStorageRecentlySelectedZoneRecord(currentReocrd);
87+
setStorageRecentlySelectedZoneRecord(currentRecord);
8888
}
8989
};
9090

0 commit comments

Comments
 (0)