Skip to content

Commit 178a018

Browse files
committed
chore: 로그인 방식별로 mutationKey 분리
1 parent 7d94126 commit 178a018

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

package/pyconkr-shop/hooks/index.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ const QUERY_KEYS = {
1111
};
1212

1313
const MUTATION_KEYS = {
14-
USER_SIGN_IN: ["mutation", "user", "sign_in"],
14+
USER_SIGN_IN_EMAIL: ["mutation", "user", "sign_in", "email"],
15+
USER_SIGN_IN_SNS: ["mutation", "user", "sign_in", "sns"],
1516
CART_ITEM_APPEND: ["mutation", "cart", "item", "append"],
1617
CART_ITEM_REMOVE: ["mutation", "cart", "item", "remove"],
1718
CART_ORDER_START: ["mutation", "cart_order", "start"],
@@ -35,13 +36,13 @@ namespace ShopAPIHook {
3536

3637
export const useSignInWithEmailMutation = () =>
3738
useMutation({
38-
mutationKey: MUTATION_KEYS.USER_SIGN_IN,
39+
mutationKey: MUTATION_KEYS.USER_SIGN_IN_EMAIL,
3940
mutationFn: ShopAPIRoute.signInWithEmail,
4041
});
4142

4243
export const useSignInWithSNSMutation = () =>
4344
useMutation({
44-
mutationKey: MUTATION_KEYS.USER_SIGN_IN,
45+
mutationKey: MUTATION_KEYS.USER_SIGN_IN_SNS,
4546
mutationFn: ShopAPIRoute.signInWithSNS,
4647
});
4748

0 commit comments

Comments
 (0)