Skip to content

Commit

Permalink
Revert "chore: 모달창 초기화 추가 (#52)"
Browse files Browse the repository at this point in the history
This reverts commit e6a65c6.
  • Loading branch information
mungjin01 committed May 23, 2024
1 parent e6a65c6 commit 140dffa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 20 deletions.
11 changes: 3 additions & 8 deletions src/apis/client.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import axios, { AxiosInstance } from 'axios';

//import { authService } from '@/services/AuthService';
//import { userService } from '@/services/UserService';
import { authService } from '@/services/AuthService';
import { userService } from '@/services/UserService';

export const noAuthClient: AxiosInstance = axios.create({
baseURL: import.meta.env.VITE_API_BASE_URL,
Expand All @@ -11,12 +11,8 @@ export const noAuthClient: AxiosInstance = axios.create({
export const authClient: AxiosInstance = axios.create({
baseURL: import.meta.env.VITE_API_BASE_URL,
withCredentials: true,
headers: {
Authorization:
'Bearer eyJhbGciOiJIUzM4NCJ9.eyJ1c2VySWQiOiI2MjdiNzFkYy1iZTQ3LTQ0OGMtOGUzZi1jY2QwOWU5ZmVmOTMiLCJpYXQiOjE3MTYzMDk3NzQsImV4cCI6MTcxNjU2ODk3NH0.6MmpL9e9QAFW25Bn7S-N0xDiy0oDvLt6kZgSXGk2H8ZHW84vMg7NacfVj-qNt4PY',
},
});
/*

authClient.interceptors.request.use((config) => {
if (userService.getUser().nickname === '') {
const registerToken = authService.getRegisterToken();
Expand Down Expand Up @@ -46,4 +42,3 @@ authClient.interceptors.response.use(
return Promise.reject(error);
}
);
*/
13 changes: 1 addition & 12 deletions src/components/common/Modal/BrandCardModal.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useEffect, useState } from 'react';
import { useState } from 'react';

import styled from 'styled-components';

Expand All @@ -23,17 +23,6 @@ export const BrandCardModal = ({ isOpen, onClose, onAdd }: ModalProps) => {
const [description, setDescription] = useState('');
const [status, setStatus] = useState<'준비' | '진행중' | '완료'>('준비');

useEffect(() => {
if (isOpen) {
setTitle('');
setType('');
setStartDate('2024.05.15');
setDate('');
setDescription('');
setStatus('준비');
}
}, [isOpen]);

const handleAdd = () => {
onAdd(title, description, date, status);
onClose();
Expand Down

0 comments on commit 140dffa

Please sign in to comment.