Skip to content

Commit

Permalink
rename: 규칙에 맞도록 쿼리 hook이름 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
pakxe committed Sep 16, 2024
1 parent 111021e commit c8407f4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions client/src/hooks/queries/useRequestPostEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ interface PostEventMutationProps {
password: string;
}

const usePostEvent = () => {
const useRequestPostEvent = () => {
return useMutation({
mutationFn: ({eventName, password}: PostEventMutationProps) => requestPostNewEvent({eventName, password}),
});
};

export default usePostEvent;
export default useRequestPostEvent;
4 changes: 2 additions & 2 deletions client/src/hooks/useSetEventPasswordPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import validateEventPassword from '@utils/validate/validateEventPassword';
import {ROUTER_URLS} from '@constants/routerUrls';
import RULE from '@constants/rule';

import usePostEvent from './queries/useRequestPostEvent';
import useRequestPostEvent from './queries/useRequestPostEvent';

const useSetEventPasswordPage = () => {
const [eventName, setEventName] = useState('');
Expand All @@ -15,7 +15,7 @@ const useSetEventPasswordPage = () => {
const [canSubmit, setCanSubmit] = useState(false);
const navigate = useNavigate();
const location = useLocation();
const {mutate: postEvent, isPending: isPostEventPending} = usePostEvent();
const {mutate: postEvent, isPending: isPostEventPending} = useRequestPostEvent();

useEffect(() => {
if (!location.state) {
Expand Down

0 comments on commit c8407f4

Please sign in to comment.