Skip to content

Commit

Permalink
refactor: 불필요한 useCallback 적용 코드 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
Creative-Lee committed Jun 9, 2023
1 parent 56d2e93 commit ef488dc
Showing 1 changed file with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { useCallback } from 'react';
import styled from 'styled-components';
import Box from 'components/@common/Box';
import useCheckOutPointCostContext from 'hooks/useContext/useCheckOutPointCostContext';
Expand All @@ -22,16 +21,13 @@ const CheckOutPointTab = () => {
? '포인트 정보를 불러오지 못했어요'
: `${userOwnPoints?.toLocaleString('ko-KR') ?? 0}P`;

const handleChangePointCost = useCallback(
(e: React.ChangeEvent<HTMLInputElement>) => {
changePointCost(e, paymentAmount, userOwnPoints ?? 0);
},
[userOwnPoints, paymentAmount, changePointCost]
);
const handleChangePointCost = (e: React.ChangeEvent<HTMLInputElement>) => {
changePointCost(e, paymentAmount, userOwnPoints ?? 0);
};

const handleAllInPoint = useCallback(() => {
const handleAllInPoint = () => {
allInPoint(paymentAmount, userOwnPoints ?? 0);
}, [paymentAmount, userOwnPoints, allInPoint]);
};

return (
<Box
Expand Down

0 comments on commit ef488dc

Please sign in to comment.