Skip to content
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/common/CheckList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ const CheckList = ({
icon={<Info className="h-6 w-6 text-white" />}
text="ํ• ์ผ ๋ชฉ๋ก 1๊ฐœ๊ฐ€ ์‚ญ์ œ๋˜์—ˆ์Šต๋‹ˆ๋‹ค"
onUndo={handleUndo}
width="w-[469px]"
width="w-[350px]"
/>
</div>
)}
Expand Down
9 changes: 0 additions & 9 deletions src/hook/jobinfo/useJobTodoCategory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
10 changes: 5 additions & 5 deletions src/hook/useJobQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`,
},
Expand All @@ -182,10 +182,10 @@ const jobOtherDreamer = async (jobId: number) => {
}
};

export const useJobOtherQuery = (jobId: number) => {
export const useJobOtherQuery = (todoGroupId: number) => {
return useQuery<JobOtherList[]>({
queryKey: ['jobOtherDreamer', jobId],
queryFn: () => jobOtherDreamer(jobId),
queryKey: ['jobOtherDreamer', todoGroupId],
queryFn: () => jobOtherDreamer(todoGroupId),
});
};

Expand Down
2 changes: 1 addition & 1 deletion src/pages/community/components/CommunityContents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type Props = {
sort?: '์ตœ์‹ ์ˆœ' | '์ธ๊ธฐ์ˆœ';
};

const normalizeLevel = (s: string) => s.replace(' ๋‹จ๊ณ„', '');
const normalizeLevel = (s: string) => s?.replace(' ๋‹จ๊ณ„', '');

const CommunityContents = ({
items,
Expand Down
2 changes: 1 addition & 1 deletion src/pages/community/components/CommunityLeftSide.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const CommunityLeftSide = () => {
{selectedJobName} HOT ํ•  ์ผ
</div>
<div className="mt-[37px] flex w-full flex-col items-start">
{popularTodos.map((item, idx) => (
{popularTodos.slice(0, 3).map((item, idx) => (
<div
key={item.id}
className="flex w-full cursor-pointer flex-row items-start justify-between py-4"
Expand Down
5 changes: 3 additions & 2 deletions src/pages/jobDetail/components/ProfileCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ import Arrow from '@assets/icons/arrow.svg?react';

type ProfileCardProps = {
jobId: number;
todoGroupId: number;
jobName?: string;
};

const ProfileCard = ({ jobId, jobName }: ProfileCardProps) => {
const ProfileCard = ({ jobId, jobName, todoGroupId }: ProfileCardProps) => {
const navigate = useNavigate();
const { data: DreamerList, isLoading } = useJobOtherQuery(jobId);
const { data: DreamerList, isLoading } = useJobOtherQuery(todoGroupId);

if (isLoading) return <LoadingSpinner />;
if (!DreamerList || DreamerList.length === 0)
Expand Down
5 changes: 0 additions & 5 deletions src/pages/jobDetail/components/RecommendTodo.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
import Arrow from '@assets/icons/arrow.svg?react';
import DetailTab from './DetailTab';

const RecommendTodo = ({ jobId }: { jobId: number }) => {
return (
<div className="mt-6 flex w-[712px] flex-col items-start rounded-[30px] border border-gray-300 bg-white px-[30px] py-10">
<div className="flex w-full flex-row items-center justify-between">
<div className="text-gray-900 font-T03-B"> ์ถ”์ฒœ ํ•  ์ผ </div>
<div className="flex cursor-pointer flex-row items-center">
<div className="text-gray-500 font-B02-SB"> ๋” ๋งŽ์€ ํ•  ์ผ ๋ณด๊ธฐ</div>
<Arrow />
</div>
</div>

<DetailTab jobId={jobId} />
Expand Down
1 change: 1 addition & 0 deletions src/pages/otherTodoList/OtherTodoListPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ const OtherTodoListPage = () => {
{eachTodos?.jobId && (
<ProfileCard
jobId={Number(eachTodos.jobId)}
todoGroupId={eachTodos.todoGroupId}
jobName={eachTodos.jobName}
/>
)}
Expand Down