diff --git a/apps/web/src/app/mentor/modify/_ui/ModifyContent/_ui/ChannelBox/ChannelItem.tsx b/apps/web/src/app/mentor/modify/_ui/ModifyContent/_ui/ChannelBox/ChannelItem.tsx
index 80acd2c2..28d77b03 100644
--- a/apps/web/src/app/mentor/modify/_ui/ModifyContent/_ui/ChannelBox/ChannelItem.tsx
+++ b/apps/web/src/app/mentor/modify/_ui/ModifyContent/_ui/ChannelBox/ChannelItem.tsx
@@ -1,17 +1,23 @@
import { useController, useFormContext } from "react-hook-form";
-import ChannelBadge from "@/components/ui/ChannelBadge";
import getErrorMessage from "@/lib/react-hook-form/getErrorMessage";
import type { ChannelType } from "@/types/mentor";
import ChannelSelect from "../../../../../../../components/mentor/ChannelSelct";
+const CHANNEL_TAG_COLORS = [
+ "bg-sub-c-100 text-sub-c-500",
+ "bg-sub-e-100 text-sub-e-500",
+ "bg-sub-d-100 text-sub-d-500",
+ "bg-sub-f-100 text-sub-f-500",
+];
+
interface ChannelItemProps {
index: number;
channel?: { type: ChannelType; url: string };
}
-const ChannelItem = ({ index, channel }: ChannelItemProps) => {
+const ChannelItem = ({ index }: ChannelItemProps) => {
const {
control,
register,
@@ -37,22 +43,22 @@ const ChannelItem = ({ index, channel }: ChannelItemProps) => {
const channelUrlError = errors.channels?.[index]?.url;
return (
-
+
0 ? "animate-channel-reveal" : ""}`}>
- {channel?.type ? (
-
- ) : (
-
- 내 채널{index + 1}
-
- )}
+
+ 내 채널 {index + 1}
+
채널 선택
-
setValue(`channels.${index}.url`, "")}
- />
+
+ setValue(`channels.${index}.url`, "")}
+ />
+
{channelTypeError && (
{getErrorMessage(channelTypeError) || "채널을 선택해주세요"}
)}
@@ -65,8 +71,8 @@ const ChannelItem = ({ index, channel }: ChannelItemProps) => {
disabled={!isChannelSelected}
className={`mt-2 h-11 w-full rounded-lg border px-4 py-3 typo-regular-2 ${
isChannelSelected
- ? "border-gray-300 bg-white text-k-300 focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary"
- : "cursor-not-allowed border-gray-200 bg-k-50 text-gray-400"
+ ? "border-k-100 bg-white text-k-300 focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary"
+ : "cursor-not-allowed border-k-100 bg-k-50 text-gray-400"
}`}
placeholder={isChannelSelected ? "URL을 입력해주세요." : "채널을 먼저 선택해주세요."}
/>
diff --git a/apps/web/src/app/mentor/modify/_ui/ModifyContent/_ui/ChannelBox/index.tsx b/apps/web/src/app/mentor/modify/_ui/ModifyContent/_ui/ChannelBox/index.tsx
index 6365d83f..127c2e90 100644
--- a/apps/web/src/app/mentor/modify/_ui/ModifyContent/_ui/ChannelBox/index.tsx
+++ b/apps/web/src/app/mentor/modify/_ui/ModifyContent/_ui/ChannelBox/index.tsx
@@ -1,14 +1,28 @@
+import { useFormContext, useWatch } from "react-hook-form";
+
import type { ChannelType } from "@/types/mentor";
import ChannelItem from "./ChannelItem";
+const MAX_CHANNELS = 4;
+
interface ChannelBoxProps {
channels: Array<{ type: ChannelType; url: string }>;
}
const ChannelBox = ({ channels }: ChannelBoxProps) => {
+ const { control } = useFormContext();
+ const watchedChannels = useWatch({ control, name: "channels" }) as
+ | Array<{ type: ChannelType | null; url: string }>
+ | undefined;
+
+ const completedCount = (watchedChannels ?? []).filter(
+ (channel) => channel?.type !== null && channel?.type !== undefined && Boolean(channel?.url?.trim()),
+ ).length;
+ const visibleCount = Math.min(completedCount + 1, MAX_CHANNELS);
+
return (
<>
- {Array.from({ length: 4 }, (_, index) => (
+ {Array.from({ length: visibleCount }, (_, index) => (
))}
>
diff --git a/apps/web/src/app/mentor/modify/_ui/ModifyContent/index.tsx b/apps/web/src/app/mentor/modify/_ui/ModifyContent/index.tsx
index 6b1bddfa..885bacbf 100644
--- a/apps/web/src/app/mentor/modify/_ui/ModifyContent/index.tsx
+++ b/apps/web/src/app/mentor/modify/_ui/ModifyContent/index.tsx
@@ -6,7 +6,6 @@ import { useGetArticleList } from "@/apis/news";
import StudyDate from "@/components/mentor/StudyDate";
import CloudSpinnerPage from "@/components/ui/CloudSpinnerPage";
import MentoProfile from "@/components/ui/ProfileWithBadge";
-import { IconUserPrimaryColor } from "@/public/svgs/mentor";
import useModifyHookForm from "./_hooks/useModifyHookForm";
import usePutMyMentorProfileHandler from "./_hooks/usePutMyMentorProfileHandler";
import AddArticleCard from "./_ui/AddArticleCard";
@@ -27,7 +26,7 @@ const ModifyContent = () => {
const { onSubmit } = usePutMyMentorProfileHandler();
// 채널 타입들을 감시
if (!myMentorProfile) return ;
- const { profileImageUrl, hasBadge, menteeCount, nickname, country, universityName, term, channels } = myMentorProfile;
+ const { profileImageUrl, hasBadge, nickname, country, universityName, term, channels } = myMentorProfile;
return (
@@ -37,17 +36,11 @@ const ModifyContent = () => {
나의 멘토
-
+
-
-
-
-
- 누적 멘티 : {menteeCount}
-
-
{country}
+
{country}
{nickname}
{universityName}
diff --git a/apps/web/src/components/mentor/ChannelSelct/index.tsx b/apps/web/src/components/mentor/ChannelSelct/index.tsx
index 4aa23b92..69f0e065 100644
--- a/apps/web/src/components/mentor/ChannelSelct/index.tsx
+++ b/apps/web/src/components/mentor/ChannelSelct/index.tsx
@@ -27,7 +27,7 @@ const ChannelSelect = ({ name = "channel", control, onChannelChange }: ChannelSe