File tree Expand file tree Collapse file tree 6 files changed +21
-17
lines changed
Expand file tree Collapse file tree 6 files changed +21
-17
lines changed Original file line number Diff line number Diff line change @@ -16,25 +16,33 @@ const DeleteButton = styled.button`
1616 }
1717` ;
1818
19- function BookAdminDelete ( { id } : { id : number } ) {
19+ function BookAdminDelete ( {
20+ id,
21+ currentPage,
22+ } : {
23+ id : number ;
24+ currentPage : number ;
25+ } ) {
2026 const queryClient = useQueryClient ( ) ;
2127
2228 const mutation = useMutation ( {
2329 mutationFn : ( id : number ) => deleteItem ( id ) ,
2430 onSuccess : async ( ) => {
2531 queryClient . setQueryData < Item [ ] > (
26- QUERY_KEY . item . items ( ITEMCATEGORY . BOOK ) ,
32+ QUERY_KEY . item . items ( ITEMCATEGORY . BOOK , currentPage ) ,
2733 ( oldData ) => {
2834 if ( ! oldData ) return [ ] ;
2935 return oldData . filter ( ( item ) => item . id !== id ) ;
3036 } ,
3137 ) ;
3238
3339 await queryClient . invalidateQueries ( {
34- queryKey : QUERY_KEY . item . items ( ITEMCATEGORY . BOOK ) ,
40+ queryKey : QUERY_KEY . item . items ( ITEMCATEGORY . BOOK , currentPage ) ,
3541 } ) ;
3642
37- queryClient . getQueryData < Item [ ] > ( QUERY_KEY . item . items ( ITEMCATEGORY . BOOK ) ) ;
43+ queryClient . getQueryData < Item [ ] > (
44+ QUERY_KEY . item . items ( ITEMCATEGORY . BOOK , currentPage ) ,
45+ ) ;
3846 } ,
3947 onError : ( error ) => {
4048 console . error ( '도서 삭제 실패' , error ) ;
Original file line number Diff line number Diff line change 11import React , { useState } from 'react' ;
22import { useMutation } from '@tanstack/react-query' ;
3- import { Link , useNavigate } from 'react-router-dom' ;
3+ import { useNavigate } from 'react-router-dom' ;
44import { Item } from '~/models/Item.ts' ;
55import { createItems } from '~/api/item.ts' ;
66import { onUploadImage } from '~/api/board.ts' ;
Original file line number Diff line number Diff line change 1- import { Link } from 'react-router-dom' ;
21import Vector from '~/assets/images/Vector/Arrow-Vector.png?format=webp&as=srcset' ;
32import Vector2 from '~/assets/images/Vector/Arrow-Vector2.png?format=webp&as=srcset' ;
43import styles from './Banner.module.css' ;
Original file line number Diff line number Diff line change 1- import { RefObject } from " react" ;
2- import styles from " ./Banner.module.css" ;
1+ import { RefObject } from ' react' ;
2+ import styles from ' ./Banner.module.css' ;
33
44interface RecruitButtonProps {
55 titleRef : RefObject < HTMLDivElement > ;
66}
77
8- const RECRUITLINK =
9- 'https://docs.google.com/forms/d/e/1FAIpQLSd-Yq9rq7tTuYXyn_RnkEvQRXP7yYVJLAWhChnPnMKtRQqrsQ/viewform' ;
10-
8+ // const RECRUITLINK =
9+ // 'https://docs.google.com/forms/d/e/1FAIpQLSd-Yq9rq7tTuYXyn_RnkEvQRXP7yYVJLAWhChnPnMKtRQqrsQ/viewform';
1110
1211function RecruitButton ( { titleRef } : RecruitButtonProps ) {
1312 return (
14- < div ref = { titleRef } className = { styles [ " recruit-apply1" ] } >
15- < button className = { styles [ " button-style" ] } > 모집이 마감되었습니다</ button >
13+ < div ref = { titleRef } className = { styles [ ' recruit-apply1' ] } >
14+ < button className = { styles [ ' button-style' ] } > 모집이 마감되었습니다</ button >
1615 </ div >
1716 ) ;
1817}
1918
20- export default RecruitButton ;
19+ export default RecruitButton ;
Original file line number Diff line number Diff line change @@ -23,7 +23,6 @@ interface SearchListProps {
2323
2424export default function SearchList ( {
2525 category,
26- boardsQuery,
2726 pinned,
2827 totalPages,
2928 currentPage,
Original file line number Diff line number Diff line change 11import { useEffect , useRef , useState } from 'react' ;
2- import { Link } from 'react-router-dom' ;
32import Cra from '~/components/Recruit/CRA/Cra' ;
43import styles from './RecruitPage.module.css' ;
54import Banner from '~/components/Recruit/Banner/Banner' ;
65import Talent from '~/components/Recruit/Talent/Talent' ;
76import Calender from '~/components/Recruit/Calender/Calender' ;
8- import RecruitButton from '~/components/Recruit/Banner/RecruitButton'
7+ import RecruitButton from '~/components/Recruit/Banner/RecruitButton' ;
98
109export default function RecruitPage ( ) {
1110 const recruitTalentRef = useRef < HTMLDivElement > ( null ) ;
You can’t perform that action at this time.
0 commit comments