Skip to content

Commit f4d4f53

Browse files
committed
Merge branch 'develop'
2 parents c5cd359 + 824e7c7 commit f4d4f53

File tree

4 files changed

+14
-19
lines changed

4 files changed

+14
-19
lines changed

src/components/BandBanner.tsx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,7 @@ export default function BandBanner() {
1111
return (
1212
<Link
1313
className="w-full h-[120px] py-7 px-[100px] mt-15 cursor-pointer relative"
14-
href={"/"} /**추후에 다시 취업률 페이지로 연동 */
15-
onClick={() => {
16-
append({
17-
title: "",
18-
message: "개발 중인 기능입니다.",
19-
type: "YELLOW",
20-
});
21-
}}
14+
href={"/job-rate"}
2215
>
2316
<div className="flex flex-col w-full h-full">
2417
<p className="text-white text-h6 leading-h6 font-b">

src/components/jobRate/JobCurrentSituation.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"use client";
22

33
import { useEmploymentStats } from "@/apis/applications";
4-
const BASE_URL = process.env.NEXT_PUBLIC_BASE_URL;
4+
const BASE_URL = process.env.NEXT_PUBLIC_IMAGE_URL;
55
import useGetClass from "@/util/getClassName";
66

77
export default function JobCurrentSituation() {
@@ -28,7 +28,7 @@ export default function JobCurrentSituation() {
2828
className="bg-[#fff] border border-[#F7F7F7] rounded-md w-[100px] h-[44px] p-1"
2929
>
3030
<img
31-
src={`${BASE_URL}/applications/employment${data.logo_url}`}
31+
src={`${BASE_URL}/${data.logo_url}`}
3232
alt={`${data.company_name} 로고`}
3333
className="w-full h-auto rounded-md"
3434
/>

src/components/jobRate/JobPieChart.tsx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,28 @@ import { useEffect, useState } from "react";
55
import { PieChart, Pie, Cell } from "recharts";
66

77
export default function JobPieChart() {
8-
const { data: employmentData } = useTotalEmplymentStats();
8+
const { data: employmentData, isLoading } = useTotalEmplymentStats();
9+
910
const passedCount = employmentData?.passed_count || 0;
1011
const totalStudentCount = employmentData?.total_student_count || 1;
12+
1113
const data = [
1214
{
1315
name: "취업 완료",
14-
value: employmentData?.passed_count,
16+
value: passedCount,
1517
color: "#237BC9",
1618
id: 1,
1719
},
1820
{
1921
name: "취업 전",
20-
value:
21-
(employmentData?.total_student_count ?? 0) -
22-
(employmentData?.passed_count ?? 0),
22+
value: totalStudentCount - passedCount,
2323
color: "rgba(35, 123, 201, 0.2)",
2424
id: 2,
2525
},
2626
];
2727

28+
if (isLoading || !employmentData) return null;
29+
2830
return (
2931
<div className="flex flex-col items-center bg-[#FFF] rounded-xl pt-[24px] pb-[27px] pr-9 gap-8 border border-[#E5E5E5]">
3032
<div className="w-full">
@@ -58,7 +60,7 @@ export default function JobPieChart() {
5860
endAngle={-270}
5961
isAnimationActive={false}
6062
>
61-
{data.map((entry, index) => (
63+
{data.map((entry) => (
6264
<Cell
6365
key={`cell-${entry.id}`}
6466
fill={entry.color}
@@ -83,7 +85,7 @@ export default function JobPieChart() {
8385
<div className="w-[1px] h-[26px] bg-[#E5E5E5]"></div>
8486
<div className="flex flex-col gap-3 items-center">
8587
<p className="text-primaryBlue03 font-m text-caption">전체 통계</p>
86-
<p className="text-primaryBlue03 font-m text-h6">{`${employmentData?.passed_count}/${employmentData?.total_student_count}명`}</p>
88+
<p className="text-primaryBlue03 font-m text-h6">{`${passedCount}/${totalStudentCount}명`}</p>
8789
</div>
8890
</div>
8991
</div>

src/util/object/enum.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,5 @@ export const bannerTypeEnum: Record<BannerStatusType, string> = {
4848
NONE: "/",
4949
INTERNSHIP: "/recruitments/?page=1&winter_intern=true",
5050
COMPANY: "/companies/detail/",
51-
EMPLOYMENT: "/", /**추후에 다시 취업률 페이지로 연동 */
52-
}
51+
EMPLOYMENT: "/job-rate",
52+
};

0 commit comments

Comments
 (0)