Skip to content

Commit

Permalink
modify. 유저 로그인 error 문구 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
hyu-dev committed Jan 2, 2024
1 parent 446c135 commit 01a3bda
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/hooks/axiosInterceptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { setAccessToken, setLoading } from '@/store/reducers';
import { TAppDispatch } from '@/store/state';
import { authFetch, axiosFetch } from '@api/axios';
import { Alert } from '@utils/Alert';
import { convertError } from '@utils/errors';
import { useEffect } from 'react';
import { useDispatch } from 'react-redux';

Expand Down Expand Up @@ -80,7 +81,7 @@ export const useAxiosInterceptor = () => {
// 유저 토큰이 유효하지 않을 떄
else if (status === 401) {
Alert.error({
title: '유저정보가 올바르지 않습니다.',
title: convertError(message),
action: () => {
dispatch(setAccessToken(''));
localStorage.clear();
Expand Down

0 comments on commit 01a3bda

Please sign in to comment.