Commit 75e59c8
committed
Refactor AuthModal logic and improve tests
- Simplified the condition for rendering the AuthModal by removing unnecessary checks for customer data.
- Updated the welcome message to default to 'back' if the customer's first name is not available.
- Adjusted the dependency array in the `useEffect` hook to only track `isRegistered`.
- Enhanced tests to verify modal behavior during passkey login, ensuring proper assertions for modal visibility and user sign-in confirmation.1 parent 5714c0b commit 75e59c8
File tree
2 files changed
+16
-8
lines changed- packages/template-retail-react-app/app/hooks
2 files changed
+16
-8
lines changedLines changed: 3 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
278 | | - | |
279 | | - | |
| 278 | + | |
280 | 279 | | |
281 | 280 | | |
282 | 281 | | |
| |||
297 | 296 | | |
298 | 297 | | |
299 | 298 | | |
300 | | - | |
| 299 | + | |
301 | 300 | | |
302 | 301 | | |
303 | 302 | | |
| |||
318 | 317 | | |
319 | 318 | | |
320 | 319 | | |
321 | | - | |
| 320 | + | |
322 | 321 | | |
323 | 322 | | |
324 | 323 | | |
| |||
Lines changed: 13 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
922 | 922 | | |
923 | 923 | | |
924 | 924 | | |
925 | | - | |
926 | 925 | | |
927 | 926 | | |
928 | | - | |
| 927 | + | |
929 | 928 | | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
930 | 933 | | |
931 | 934 | | |
932 | 935 | | |
| |||
958 | 961 | | |
959 | 962 | | |
960 | 963 | | |
| 964 | + | |
961 | 965 | | |
962 | 966 | | |
963 | 967 | | |
| |||
1030 | 1034 | | |
1031 | 1035 | | |
1032 | 1036 | | |
1033 | | - | |
| 1037 | + | |
| 1038 | + | |
1034 | 1039 | | |
1035 | 1040 | | |
1036 | 1041 | | |
| |||
1062 | 1067 | | |
1063 | 1068 | | |
1064 | 1069 | | |
1065 | | - | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
1066 | 1075 | | |
1067 | 1076 | | |
1068 | 1077 | | |
| |||
0 commit comments