Skip to content

Commit a5e107c

Browse files
authored
refactor: remove magic string (#18)
1 parent b60d206 commit a5e107c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/hooks/useStatus.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,21 +100,21 @@ export default function useStatus(
100100
[STEP_ACTIVE]?: MotionEventHandler;
101101
}>(() => {
102102
switch (status) {
103-
case 'appear':
103+
case STATUS_APPEAR:
104104
return {
105105
[STEP_PREPARE]: onAppearPrepare,
106106
[STEP_START]: onAppearStart,
107107
[STEP_ACTIVE]: onAppearActive,
108108
};
109109

110-
case 'enter':
110+
case STATUS_ENTER:
111111
return {
112112
[STEP_PREPARE]: onEnterPrepare,
113113
[STEP_START]: onEnterStart,
114114
[STEP_ACTIVE]: onEnterActive,
115115
};
116116

117-
case 'leave':
117+
case STATUS_LEAVE:
118118
return {
119119
[STEP_PREPARE]: onLeavePrepare,
120120
[STEP_START]: onLeaveStart,

0 commit comments

Comments
 (0)