Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

저장하기 알람 #100

Merged
merged 2 commits into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/api/hooks/Mail/useGetMail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export const getMailPath = (page: number, size: number) =>

const createApiClient = (job: string) => {
const token = sessionStorage.getItem('accessToken');
console.log(job);
return axios.create({
baseURL: BASE_URL,
headers: {
Expand All @@ -19,7 +20,6 @@ const createApiClient = (job: string) => {

const getMail = async (page: number, size: number, job: string) => {
try {
console.log(job, page, size);
const apiClient = createApiClient(job);
const response = await apiClient.get<MailListResponse>(getMailPath(page, size));
return response.data;
Expand Down
2 changes: 2 additions & 0 deletions src/components/Mail/MailModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,11 @@ export const MailModal = ({ isOpen, onOpen, onClose }: MailModalProps) => {
const handlePutMail = () => {
if (authInfo) {
mailmutate({ ...mailResult });
alert('📨 저장이 완료되었습니다!');
} else {
alert('로그인 후 메일을 저장 할 수 있습니다.');
}
onClose();
};

useEffect(() => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Mail/MailModalData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const placeholderTextsBusiness = [
];

export const modalHeaderContentBusiness = [
'메일 작성 목적을 선택해 주세요',
'메일 작성 목적을 입력해 주세요',
'보내는 사람의 이름을 입력해 주세요',
'소속 회사명을 입력해 주세요',
'소속 부서를 입력해 주세요',
Expand Down