Skip to content

Commit

Permalink
feat :: 배너 리뷰 반영
Browse files Browse the repository at this point in the history
  • Loading branch information
은지 committed Jun 8, 2024
1 parent ae5f086 commit 38ad910
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 12 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@tanstack/react-query": "^4.36.1",
"@team-return/design-system": "^1.1.13",
"axios": "^1.3.4",
"file-saver": "^2.0.5",
Expand Down
4 changes: 3 additions & 1 deletion src/Apis/Files/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ import { PresignedUrlResponse } from './response';
import { instance } from '../axios';
import axios from 'axios';

const EXTENSION_FILE = 'EXTENSION_FILE';

export const usePresignedUrl = () => {
return useMutation(
async (attachments: File[]) => {
const files = attachments.map((item) => ({
type: 'EXTENSION_FILE',
type: EXTENSION_FILE,
file_name: item.name,
}));

Expand Down
12 changes: 5 additions & 7 deletions src/Apis/Files/response.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
export interface PresignedUrlResponse {
urls: [
{
file_path: string,
pre_signed_url: string
}
]
}
urls: {
file_path: string;
pre_signed_url: string;
}[];
}
5 changes: 3 additions & 2 deletions src/Components/Banner/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@ export function Banner() {
if (id) {
await DeleteBannersAPI.mutateAsync();
queryClient.fetchQuery(['getBannerList']);
window.location.reload();
}
setShowDeleteAlarm(false);
};

const DeleteBannersAPI = useDeleteBanner(id!, {
onSuccess: () => {},
onSuccess: () => {
window.location.reload();
},
onError: () => {},
});

Expand Down
1 change: 0 additions & 1 deletion src/Components/CreateBanner/styled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ export const CompanyNameSearch = styled.tr`

export const RecruitmentSearch = styled.tr`
position: relative;
z-index: 1;
`;

export const Td = styled.td`
Expand Down

0 comments on commit 38ad910

Please sign in to comment.