diff --git a/src/common/CheckList.tsx b/src/common/CheckList.tsx index 85bfa4c..69c4bb1 100644 --- a/src/common/CheckList.tsx +++ b/src/common/CheckList.tsx @@ -295,7 +295,7 @@ const CheckList = ({ icon={} text="할일 목록 1개가 삭제되었습니다" onUndo={handleUndo} - width="w-[469px]" + width="w-[350px]" /> )} diff --git a/src/hook/jobinfo/useJobTodoCategory.ts b/src/hook/jobinfo/useJobTodoCategory.ts index c77ee58..cb1ae39 100644 --- a/src/hook/jobinfo/useJobTodoCategory.ts +++ b/src/hook/jobinfo/useJobTodoCategory.ts @@ -14,16 +14,7 @@ export interface JobTodoCategoryProps { const JobTodoCategory = async (id: number, todoCategory: string) => { try { - const token = localStorage.getItem('accessToken'); - - if (!token) { - throw new Error('인증 토큰이 없습니다'); - } - const response = await api.get('/v1/job/todo', { - headers: { - Authorization: `Bearer ${token}`, - }, params: { id, todoCategory, diff --git a/src/hook/useJobQuery.ts b/src/hook/useJobQuery.ts index 4139e21..d69f74a 100644 --- a/src/hook/useJobQuery.ts +++ b/src/hook/useJobQuery.ts @@ -167,10 +167,10 @@ export interface JobOtherList { ]; } -const jobOtherDreamer = async (jobId: number) => { +const jobOtherDreamer = async (todoGroupId: number) => { try { const token = localStorage.getItem('accessToken'); - const response = await api.get(`/v1/todo/other/simple/${jobId}`, { + const response = await api.get(`/v1/todo/other/simple/${todoGroupId}`, { headers: { Authorization: `Bearer ${token}`, }, @@ -182,10 +182,10 @@ const jobOtherDreamer = async (jobId: number) => { } }; -export const useJobOtherQuery = (jobId: number) => { +export const useJobOtherQuery = (todoGroupId: number) => { return useQuery({ - queryKey: ['jobOtherDreamer', jobId], - queryFn: () => jobOtherDreamer(jobId), + queryKey: ['jobOtherDreamer', todoGroupId], + queryFn: () => jobOtherDreamer(todoGroupId), }); }; diff --git a/src/pages/community/components/CommunityContents.tsx b/src/pages/community/components/CommunityContents.tsx index 70fce4a..b2811a1 100644 --- a/src/pages/community/components/CommunityContents.tsx +++ b/src/pages/community/components/CommunityContents.tsx @@ -24,7 +24,7 @@ type Props = { sort?: '최신순' | '인기순'; }; -const normalizeLevel = (s: string) => s.replace(' 단계', ''); +const normalizeLevel = (s: string) => s?.replace(' 단계', ''); const CommunityContents = ({ items, diff --git a/src/pages/community/components/CommunityLeftSide.tsx b/src/pages/community/components/CommunityLeftSide.tsx index 9b09198..6a8dddf 100644 --- a/src/pages/community/components/CommunityLeftSide.tsx +++ b/src/pages/community/components/CommunityLeftSide.tsx @@ -43,7 +43,7 @@ const CommunityLeftSide = () => { {selectedJobName} HOT 할 일
- {popularTodos.map((item, idx) => ( + {popularTodos.slice(0, 3).map((item, idx) => (
{ +const ProfileCard = ({ jobId, jobName, todoGroupId }: ProfileCardProps) => { const navigate = useNavigate(); - const { data: DreamerList, isLoading } = useJobOtherQuery(jobId); + const { data: DreamerList, isLoading } = useJobOtherQuery(todoGroupId); if (isLoading) return ; if (!DreamerList || DreamerList.length === 0) diff --git a/src/pages/jobDetail/components/RecommendTodo.tsx b/src/pages/jobDetail/components/RecommendTodo.tsx index cc6ef73..ccc0e77 100644 --- a/src/pages/jobDetail/components/RecommendTodo.tsx +++ b/src/pages/jobDetail/components/RecommendTodo.tsx @@ -1,4 +1,3 @@ -import Arrow from '@assets/icons/arrow.svg?react'; import DetailTab from './DetailTab'; const RecommendTodo = ({ jobId }: { jobId: number }) => { @@ -6,10 +5,6 @@ const RecommendTodo = ({ jobId }: { jobId: number }) => {
추천 할 일
-
-
더 많은 할 일 보기
- -
diff --git a/src/pages/otherTodoList/OtherTodoListPage.tsx b/src/pages/otherTodoList/OtherTodoListPage.tsx index 0a00b08..5bb90f2 100644 --- a/src/pages/otherTodoList/OtherTodoListPage.tsx +++ b/src/pages/otherTodoList/OtherTodoListPage.tsx @@ -111,6 +111,7 @@ const OtherTodoListPage = () => { {eachTodos?.jobId && ( )}