Skip to content

Commit acc017c

Browse files
committed
fix : category 버그 및 비로그인 입장 버그 수정
1 parent 1810fb1 commit acc017c

4 files changed

Lines changed: 15 additions & 6 deletions

File tree

src/api/boards/clients/useGetPostList.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { AxiosResponse } from "axios";
22

3-
import { axiosInstance } from "@/utils/axiosInstance";
3+
import { publicAxiosInstance } from "@/utils/axiosInstance";
44

55
import { QueryKeys } from "./QueryKeys";
66

@@ -14,15 +14,15 @@ interface UseGetPostListProps {
1414
}
1515

1616
const getPostList = (boardCode: string, category: string | null = null): Promise<AxiosResponse<ListPost[]>> =>
17-
axiosInstance.get(`/boards/${boardCode}`, {
17+
publicAxiosInstance.get(`/boards/${boardCode}`, {
1818
params: {
1919
category,
2020
},
2121
});
2222

2323
const useGetPostList = ({ boardCode, category = null }: UseGetPostListProps) => {
2424
return useQuery({
25-
queryKey: [QueryKeys.postList],
25+
queryKey: [QueryKeys.postList, boardCode, category],
2626
queryFn: () => getPostList(boardCode, category),
2727
// staleTime을 무한으로 설정하여 불필요한 자동 refetch를 방지합니다.
2828
staleTime: Infinity,

src/app/community/[boardCode]/CommunityPageContent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const CommunityPageContent = ({ boardCode }: CommunityPageContentProps) => {
2121
const router = useRouter();
2222
const [category, setCategory] = useState<string | null>("전체");
2323

24-
const { data: posts = [] } = useGetPostList({ boardCode });
24+
const { data: posts = [] } = useGetPostList({ boardCode, category });
2525

2626
const handleBoardChange = (newBoard: string) => {
2727
router.push(`/community/${newBoard}`);

src/app/my/_ui/MyProfileContent/index.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,17 @@ const MyProfileContent = () => {
7575
<div className="w-full cursor-pointer rounded-lg bg-secondary-500 py-2 text-center font-medium text-white">
7676
<Link href={"/my/modify"}>프로필 변경</Link>
7777
</div>
78-
<Link className="w-full" href={"/my/apply-mentor"}>
78+
{/* <Link className="w-full" href={"/my/apply-mentor"}>
7979
<button className="w-full rounded-lg bg-secondary-800 py-2 font-medium text-white">멘토 회원 전환</button>
80-
</Link>
80+
</Link> */}
81+
<button
82+
onClick={() => {
83+
toast.info("조금만 기다려주세요. [업데이트 중]");
84+
}}
85+
className="w-full rounded-lg bg-secondary-800 py-2 font-medium text-white"
86+
>
87+
멘토 회원 전환
88+
</button>
8189
</div>
8290
)}
8391
</div>

src/app/my/apply-mentor/_components/UniversityScreen/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ const UniversityScreen = ({ onNext }: UniversityScreenProps) => {
191191
주세요.
192192
</li>
193193
<li>실명을 제외한 개인정보는 모두 가려주세요.</li>
194+
<li>업로드 가능한 파일 유형은 [png, jpg, pdf] 입니다.</li>
194195
</ul>
195196
</div>
196197
</div>

0 commit comments

Comments
 (0)