From 614e92aa691c749357a54f196d498c8e2268e3cf Mon Sep 17 00:00:00 2001 From: aken-you Date: Mon, 28 Jul 2025 22:51:42 +0900 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=ED=86=A0=EA=B8=80=20=EB=B9=84?= =?UTF-8?q?=ED=99=9C=EC=84=B1=ED=99=94=20=EC=8A=A4=ED=83=80=EC=9D=BC=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/shared/ui/toggle/switch.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/ui/toggle/switch.tsx b/src/shared/ui/toggle/switch.tsx index b2adea29..91b7c322 100644 --- a/src/shared/ui/toggle/switch.tsx +++ b/src/shared/ui/toggle/switch.tsx @@ -5,7 +5,7 @@ import { cva } from 'class-variance-authority'; import { cn } from '@/shared/shadcn/lib/utils'; const toggleRootVariants = cva( - 'inline-flex items-center rounded-full transition-colors cursor-pointer', + 'inline-flex items-center rounded-full transition-colors cursor-pointer disabled:cursor-not-allowed', { variants: { color: { From c522e2f53640c5beab206772b29f5104f1ba92b9 Mon Sep 17 00:00:00 2001 From: aken-you Date: Mon, 28 Jul 2025 22:54:57 +0900 Subject: [PATCH 2/2] =?UTF-8?q?refactor:=20=EC=8A=A4=ED=84=B0=EB=94=94=20?= =?UTF-8?q?=EC=8B=A0=EC=B2=AD=ED=95=98=EC=A7=80=20=EC=95=8A=EC=9D=84=20?= =?UTF-8?q?=EA=B2=BD=EC=9A=B0,=20=EB=A7=A4=EC=B9=AD=20=ED=86=A0=EA=B8=80?= =?UTF-8?q?=20=EB=B9=84=ED=99=9C=EC=84=B1=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/features/study/ui/my-profile-card.tsx | 6 +++++- src/widgets/home/sidebar.tsx | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/features/study/ui/my-profile-card.tsx b/src/features/study/ui/my-profile-card.tsx index be84c7ea..df1b0178 100644 --- a/src/features/study/ui/my-profile-card.tsx +++ b/src/features/study/ui/my-profile-card.tsx @@ -18,6 +18,7 @@ interface MyProfileCardProps { subject?: string; time?: string; techStacks?: string; + studyApplied?: boolean; } export default function MyProfileCard({ @@ -28,6 +29,7 @@ export default function MyProfileCard({ subject, time, techStacks, + studyApplied, }: MyProfileCardProps) { const [enabled, setEnabled] = useState(matching); @@ -35,6 +37,8 @@ export default function MyProfileCard({ usePatchAutoMatchingMutation(); const handleToggleChange = (checked: boolean) => { + if (!studyApplied) return; + setEnabled(checked); patchAutoMatching( @@ -69,7 +73,7 @@ export default function MyProfileCard({ size="md" checked={enabled} onCheckedChange={handleToggleChange} - disabled={isPending} + disabled={isPending || !studyApplied} /> diff --git a/src/widgets/home/sidebar.tsx b/src/widgets/home/sidebar.tsx index cd342461..9709d142 100644 --- a/src/widgets/home/sidebar.tsx +++ b/src/widgets/home/sidebar.tsx @@ -27,6 +27,7 @@ export default async function Sidebar() { techStacks={userProfile?.memberInfo.techStacks ?.map((t) => t.techStackName) .join(', ')} + studyApplied={userProfile?.studyApplied ?? false} /> {userProfile.studyApplied ? (