Skip to content
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
073ea30
feat: 프로필 수정 상단 퍼블리싱 (#307)
Aug 25, 2025
52a6640
feat: 프로필 수정 내 응원팀 추가 (#307)
Aug 25, 2025
80d8365
feat: 매칭 조건 수정 리스트 추가 (#307)
Aug 25, 2025
e77e61b
feat: 조건 수정 초기값 반영 (#307)
Aug 25, 2025
ebc7694
feat: selectionGroup component 분리 (#307)
Aug 25, 2025
35bd25a
feat: 클릭시 로직 추가 (#307)
Aug 25, 2025
0a9db30
style: 불필요한 border-t 삭제 (#307)
Aug 25, 2025
1be8cf3
feat: SP1 회원가입 페이지 디자인 반영사항 적용 (#304)
heesunee Aug 27, 2025
aeb1d57
feat: 응원팀 없어요 클릭시 메이트의 응원팀 disabled (#307)
Aug 29, 2025
af76108
feat: 응원팀 없을때 기본 값 수정 (#307)
Aug 29, 2025
2791633
feat: button disabled style add (#307)
Aug 29, 2025
63642fd
fix: 수정 취소 (#307)
Aug 29, 2025
731d6eb
fix: 수정 취소 (#307)
Aug 29, 2025
96dbf08
feat: SP1 마이페이지 수정 및 로그아웃 api 연결 (#306)
heesunee Aug 31, 2025
38847dd
feat: 프로필 수정 상단 퍼블리싱 (#307)
Aug 25, 2025
7fefbb5
feat: 프로필 수정 내 응원팀 추가 (#307)
Aug 25, 2025
5493c16
feat: 매칭 조건 수정 리스트 추가 (#307)
Aug 25, 2025
8dc3a8b
feat: 조건 수정 초기값 반영 (#307)
Aug 25, 2025
4172685
feat: selectionGroup component 분리 (#307)
Aug 25, 2025
b47956a
feat: 클릭시 로직 추가 (#307)
Aug 25, 2025
cecb1dd
style: 불필요한 border-t 삭제 (#307)
Aug 25, 2025
ff6def1
feat: 응원팀 없어요 클릭시 메이트의 응원팀 disabled (#307)
Aug 29, 2025
fb5eb06
feat: 응원팀 없을때 기본 값 수정 (#307)
Aug 29, 2025
514e955
feat: button disabled style add (#307)
Aug 29, 2025
9634c62
fix: 수정 취소 (#307)
Aug 29, 2025
25ada84
fix: 수정 취소 (#307)
Aug 29, 2025
cbbe807
feat: 프로필 수정 버튼 링크 연결 (#307)
Aug 31, 2025
85bfe7d
feat: 프로필 수정 페이지 내 divider, 한줄 소개 input 수정(#307)
Aug 31, 2025
688a784
feat: 리뷰 반영 (#307)
Aug 31, 2025
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
49 changes: 49 additions & 0 deletions src/pages/edit-profile/components/selection-group.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import Button from '@components/button/button/button';
import { cn } from '@libs/cn';

interface SelectionGroupProps {
title: string;
options: { id: number; label: string }[] | string[];
selectedValue: string;
onSelect: (value: string) => void;
disabled?: boolean;
}

const SelectionGroup = ({
title,
options,
selectedValue,
onSelect,
disabled,
}: SelectionGroupProps) => {
return (
<div className="flex-col gap-[1.6rem]">
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

flex 누락으로 레이아웃/간격 깨짐

gap이 적용되지 않고 수직 레이아웃도 동작하지 않습니다. flex를 추가하세요.

-    <div className="flex-col gap-[1.6rem]">
+    <div className="flex flex-col gap-[1.6rem]">
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<div className="flex-col gap-[1.6rem]">
<div className="flex flex-col gap-[1.6rem]">
🤖 Prompt for AI Agents
In src/pages/edit-profile/components/selection-group.tsx around line 20, the
wrapper div only has column and gap classes so the flex layout isn't enabled;
add the missing flex class to enable flexbox and make gap and vertical layout
work (i.e., include the 'flex' utility alongside the existing column and gap
utilities on that div).

<p className="body_16_m">{title}</p>
<div className="flex flex-wrap gap-[0.8rem]">
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

선택 그룹 컨테이너에 접근성 역할 부여 (radiogroup)

단일 선택 그룹이면 radiogroup을 부여하고 제목으로 레이블링하세요.

-      <div className="flex flex-wrap gap-[0.8rem]">
+      <div
+        className="flex flex-wrap gap-[0.8rem]"
+        role="radiogroup"
+        aria-label={title}
+      >
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<div className="flex flex-wrap gap-[0.8rem]">
<div
className="flex flex-wrap gap-[0.8rem]"
role="radiogroup"
aria-label={title}
>
🤖 Prompt for AI Agents
In src/pages/edit-profile/components/selection-group.tsx around line 22, the
selection group container lacks an accessibility role and label; for a
single-selection group add role="radiogroup" to the div and provide a label via
aria-labelledby (preferred) or aria-label: give the group title element a stable
id (e.g. id="selection-group-title") and set
aria-labelledby="selection-group-title" on the div so assistive tech sees the
radiogroup and its title.

{options.map((option) => {
const key = typeof option === 'string' ? option : option.id;
const label = typeof option === 'string' ? option : option.label;
const isSelected = selectedValue === label;

return (
<Button
key={key}
label={label}
variant={disabled ? 'disabled' : isSelected ? 'skyblue' : 'gray2'}
className={cn(
'cap_14_sb w-auto px-[1.6rem] py-[0.6rem]',
disabled && 'cursor-not-allowed',
)}
onClick={() => {
if (disabled) return;
onSelect(label);
}}
/>
Comment on lines +29 to +41
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Form 내 의도치 않은 submit + 비활성화/선택 상태의 ARIA 미부여

Button이 form 내부에 있으면 기본 type=submit로 동작할 수 있습니다. 또한 비활성/선택 상태를 스크린리더가 인지하도록 role/aria/disabled를 명시하세요. Button 컴포넌트가 native props를 포워딩한다는 전제입니다.

             <Button
-              key={key}
+              key={key}
               label={label}
               variant={disabled ? 'disabled' : isSelected ? 'skyblue' : 'gray2'}
               className={cn(
                 'cap_14_sb w-auto px-[1.6rem] py-[0.6rem]',
                 disabled && 'cursor-not-allowed',
               )}
+              type="button"
+              role="radio"
+              aria-checked={isSelected}
+              aria-disabled={disabled || undefined}
+              disabled={disabled}
+              data-selected={isSelected || undefined}
               onClick={() => {
                 if (disabled) return;
                 onSelect(label);
               }}
             />

검증용 스크립트(위 변경이 유효하려면 Button이 해당 props를 지원해야 합니다):


🏁 Script executed:

#!/bin/bash
# Button 컴포넌트가 HTMLButtonElement props(type/disabled/aria-*)를 포워딩하는지 확인
fd -a -t f -E node_modules '(?i)button\.(tsx|jsx)$'
rg -n -C2 -P 'export\s+(default\s+)?function\s+Button|type\s+ButtonProps|interface\s+ButtonProps' $(fd -t f -E node_modules '(?i)button\.(tsx|jsx)$')
rg -n -C2 -P '\bdisabled\b|\btype\??:\s*["'\'']?(button|submit)?' $(fd -t f -E node_modules '(?i)button\.(tsx|jsx)$')

Length of output: 2836


Button 컴포넌트에 네이티브 버튼·ARIA 속성 포워딩 리팩터링 필요

  • form 내부 버튼이 기본 submit 동작을 하지 않도록 type="button" 명시 전달
  • disabled 상태가 네이티브 disabled 속성으로 반영되도록 disabled={disabled} 전달 (스크린리더는 aria-disabled 대신 native disabled를 우선 인식)
  • role, aria-checked, aria-disabled, data-selected 등 추가 ARIA 속성을 전달하려면 ButtonProps를 React.ButtonHTMLAttributes 로 확장하고 {...rest} 을 내부 에 스프레드하여 포워딩 구현
🤖 Prompt for AI Agents
In src/pages/edit-profile/components/selection-group.tsx around lines 29 to 41,
the Button usage must forward native button/ARIA attributes: pass type="button"
to avoid implicit form submits, pass disabled={disabled} so the native disabled
attribute is set, and forward role, aria-checked, aria-disabled, data-selected,
etc. by extending ButtonProps with React.ButtonHTMLAttributes<HTMLButtonElement>
and collecting {...rest} in the parent; then spread {...rest} onto the internal
<button> inside Button (ensuring onClick still no-ops when disabled). Update
prop types and the Button implementation to accept and forward these attributes.

);
})}
</div>
</div>
);
};

export default SelectionGroup;
1 change: 1 addition & 0 deletions src/pages/edit-profile/constants/edit-profile.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const PROFILE_SYNK_MATE = ['같은 팀 메이트', '상관없어요'];
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

상수명 오타(SYNK→SYNC) 및 타입 협소화(as const) 제안

  • 상수명에 오타가 있어 보입니다: PROFILE_SYNK_MATE → PROFILE_SYNC_MATE. 팀 내부 명명 규칙(영문 대문자 스네이크 케이스)과도 맞추면 좋겠습니다.
  • 선택지 배열은 as const로 고정하면, SelectionGroup 등에서 보다 안전한 유니온 타입을 얻을 수 있어 오타 방지 및 DX가 개선됩니다.

아래처럼 수정 제안드립니다:

-export const PROFILE_SYNK_MATE = ['같은 팀 메이트', '상관없어요'];
+export const PROFILE_SYNC_MATE = ['같은 팀 메이트', '상관없어요'] as const;
+export type ProfileSyncMateOption = typeof PROFILE_SYNC_MATE[number];

호출부/임포트 경로의 식별자도 함께 교체가 필요합니다. 빠르게 점검하려면:


🏁 Script executed:

#!/bin/bash
# PROFILE_SYNK_MATE 참조 지점 확인
rg -n "PROFILE_SYNK_MATE" -S

Length of output: 341


PROFILE_SYNK_MATE 상수명 오타 수정 및 타입 고정 제안

프로필 편집 페이지 상수명에 오타가 있고, 배열을 고정(as const)하여 안전한 유니온 타입을 사용하는 것을 제안드립니다. 다음 두 부분을 수정해주세요:

  • src/pages/edit-profile/constants/edit-profile.ts

    1. PROFILE_SYNK_MATEPROFILE_SYNC_MATE
    2. 배열 뒤에 as const 추가
    3. 선택지를 표현하는 타입 추가
  • src/pages/edit-profile/edit-profile.tsx

    1. import 구문에서 PROFILE_SYNK_MATEPROFILE_SYNC_MATE로 변경
    2. options={PROFILE_SYNK_MATE}options={PROFILE_SYNC_MATE}로 변경

제안하는 코드 예시:

--- src/pages/edit-profile/constants/edit-profile.ts
@@
-export const PROFILE_SYNK_MATE = ['같은 팀 메이트', '상관없어요'];
+export const PROFILE_SYNC_MATE = ['같은 팀 메이트', '상관없어요'] as const;
+export type ProfileSyncMateOption = typeof PROFILE_SYNC_MATE[number];
--- src/pages/edit-profile/edit-profile.tsx
@@
-import { PROFILE_SYNK_MATE } from '@pages/edit-profile/constants/edit-profile';
+import { PROFILE_SYNC_MATE } from '@pages/edit-profile/constants/edit-profile';
@@
-            options={PROFILE_SYNK_MATE}
+            options={PROFILE_SYNC_MATE}

위와 같이 수정하시면 오타도 해결되고, as const를 통한 안전한 타입 활용으로 개발자 경험도 개선됩니다.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
export const PROFILE_SYNK_MATE = ['같은 팀 메이트', '상관없어요'];
// src/pages/edit-profile/constants/edit-profile.ts
export const PROFILE_SYNC_MATE = ['같은 팀 메이트', '상관없어요'] as const;
export type ProfileSyncMateOption = typeof PROFILE_SYNC_MATE[number];
🤖 Prompt for AI Agents
In src/pages/edit-profile/constants/edit-profile.ts (line 1), rename the
constant PROFILE_SYNK_MATE to PROFILE_SYNC_MATE, append `as const` to the
exported array to make it readonly, and add a narrow union type (e.g., type
ProfileSyncMate = typeof PROFILE_SYNC_MATE[number]) to represent allowed values;
then update src/pages/edit-profile/edit-profile.tsx import to use
PROFILE_SYNC_MATE and change any usage from options={PROFILE_SYNK_MATE} to
options={PROFILE_SYNC_MATE}.

139 changes: 139 additions & 0 deletions src/pages/edit-profile/edit-profile.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
import Button from '@components/button/button/button';
import Input from '@components/input/input';
import { cn } from '@libs/cn';
import SelectionGroup from '@pages/edit-profile/components/selection-group';
import { PROFILE_SYNK_MATE } from '@pages/edit-profile/constants/edit-profile';
import { mockEditData } from '@pages/edit-profile/mocks/mockEditData';
import {
GENDER,
NO_TEAM_OPTION,
TEAMS,
VIEWING_STYLE,
} from '@pages/onboarding/constants/onboarding';
import { NICKNAME_RULE_MESSAGE } from '@pages/sign-up/constants/NOTICE';
import { NICKNAME_PLACEHOLDER } from '@pages/sign-up/constants/validation';
import { useMemo, useRef, useState } from 'react';

const EditProfile = () => {
const [team, setTeam] = useState(mockEditData.team);
const [gender, setGender] = useState(mockEditData.genderPreference);
const [mateTeam, setMateTeam] = useState(mockEditData.teamAllowed || '상관없어요');
const [viewStyle, setViewStyle] = useState(mockEditData.style);
const [isSubmit, setIsSubmit] = useState(false);

const initialValue = useRef({
team: mockEditData.team,
gender: mockEditData.genderPreference,
mateTeam: mockEditData.teamAllowed,
viewStyle: mockEditData.style,
});

const isDirty = useMemo(() => {
const init = initialValue.current;

return (
team !== init.team ||
gender !== init.gender ||
mateTeam !== init.mateTeam ||
viewStyle !== init.viewStyle
);
}, [team, gender, mateTeam, viewStyle]);

const handleSaveClick = () => {
if (!isDirty) return;

setIsSubmit(true);

// TODO: 실제 API 호출
};

return (
<div className="h-full bg-gray-white px-[1.6rem] pt-[1.6rem] pb-[4rem]">
<h2 className="subhead_18_sb mb-[1.6rem]">프로필 수정</h2>
<section>
<Input
placeholder={NICKNAME_PLACEHOLDER}
label="닉네임"
defaultMessage={NICKNAME_RULE_MESSAGE}
/>
<div className="mb-[2.5rem] flex justify-end">
<Button label="수정" className="cap_14_sb mt-[0.8rem] w-auto px-[1.6rem] py-[0.6rem]" />
</div>

<Input
placeholder={NICKNAME_PLACEHOLDER}
label="한 줄 소개"
defaultMessage={NICKNAME_RULE_MESSAGE}
/>
<div className="flex justify-end">
<Button label="수정" className="cap_14_sb mt-[0.8rem] w-auto px-[1.6rem] py-[0.6rem]" />
</div>
</section>

<section className="flex-col pb-[5.6rem]">
<h2 className="subhead_18_sb mb-[0.4rem]">매칭 조건 수정</h2>
<p className="cap_12_m mb-[1.6rem] text-gray-500">
수정한 조건을 기반으로 새로운 메이트를 추천해드려요!
</p>

<div className="flex-col gap-[3.2rem]">
<div className="flex-col gap-[1.6rem]">
<p className="body_16_m">응원팀</p>
<div className="flex flex-wrap gap-[0.8rem]">
{TEAMS.map((option) => {
const selected = team === option;
return (
<Button
key={option}
label={option}
variant={selected ? 'skyblue' : 'gray2'}
className="cap_14_sb w-auto px-[1.6rem] py-[0.6rem] text-gray-900"
onClick={() => setTeam(option)}
/>
);
})}
<Button
label={NO_TEAM_OPTION}
variant={team === NO_TEAM_OPTION ? 'skyblue' : 'gray2'}
className="cap_14_sb w-fit px-[1.6rem] py-[0.6rem] text-gray-900"
onClick={() => setTeam(NO_TEAM_OPTION)}
/>
</div>
</div>

<SelectionGroup
title="직관 메이트의 응원팀"
options={PROFILE_SYNK_MATE}
selectedValue={team === NO_TEAM_OPTION ? '' : mateTeam}
onSelect={setMateTeam}
disabled={team === NO_TEAM_OPTION}
/>

<SelectionGroup
title="관람 스타일"
options={VIEWING_STYLE}
selectedValue={viewStyle}
onSelect={setViewStyle}
/>

<SelectionGroup
title="선호 성별"
options={GENDER}
selectedValue={gender}
onSelect={setGender}
/>
</div>
</section>

<Button
variant={!isDirty || isSubmit ? 'disabled' : 'blue'}
className={cn((!isDirty || isSubmit) && 'cursor-not-allowed')}
onClick={handleSaveClick}
label="매칭 조건 수정"
ariaLabel="매칭 조건 수정"
/>
</div>
);
};

export default EditProfile;
6 changes: 6 additions & 0 deletions src/pages/edit-profile/mocks/mockEditData.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export const mockEditData = {
team: '응원하는 팀이 없어요.',
teamAllowed: '상관없어요',
style: '직관먹방러',
genderPreference: '여성',
};
Comment on lines +1 to +6
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

타입 안전성 보강: 명시적 폼 타입으로 검증(satisfies) 적용

mock 객체에 명시적 타입을 부여해 키 누락/오타를 컴파일 타임에 차단하세요. 기존 폼 타입이 있다면 import 하여 satisfies를 쓰는 걸 권장합니다.

+// TODO: 실제 폼 타입 경로로 교체
+import type { EditProfileFormValues } from '../types';
-export const mockEditData = {
+export const mockEditData = {
   team: '응원하는 팀이 없어요.',
-  teamAllowed: '상관없어요',
-  style: '직관먹방러',
-  genderPreference: '여성',
+  mateTeam: '상관없어요',
+  viewStyle: '직관먹방러',
+  gender: '여성',
-};
+} satisfies EditProfileFormValues;

만약 공용 타입이 없다면, 모크에 중복 정의하지 말고 공용 타입을 새로 추가해 재사용하도록 제안합니다.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
export const mockEditData = {
team: '응원하는 팀이 없어요.',
teamAllowed: '상관없어요',
style: '직관먹방러',
genderPreference: '여성',
};
// TODO: 실제 폼 타입 경로로 교체
import type { EditProfileFormValues } from '../types';
export const mockEditData = {
team: '응원하는 팀이 없어요.',
mateTeam: '상관없어요',
viewStyle: '직관먹방러',
gender: '여성',
} satisfies EditProfileFormValues;
🤖 Prompt for AI Agents
In src/pages/edit-profile/mocks/mockEditData.ts around lines 1 to 6, the mock
object is untyped which allows key typos or missing properties; import the
existing form type (e.g., EditProfileFormValues) from the canonical types file
and apply TypeScript's satisfies operator to the mock (mockEditData satisfies
EditProfileFormValues) so the compiler validates keys and value shapes; if no
shared form type exists, add a reusable type definition in the appropriate
shared/types or feature types file and then import and use satisfies instead of
duplicating the type inline.

5 changes: 0 additions & 5 deletions src/pages/profile/edit-profile/edit-profile.tsx

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ export const buttonVariants = cva(
variant: {
blue: 'bg-main-900 text-white',
gray: 'bg-gray-400 text-white',
skyblue: 'bg-main-200 text-main-900',
skyblue: '!text-main-900 bg-main-200',
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

skyblue 변형의 !important 사용은 disabled 스타일링을 깨뜨릴 수 있습니다

!text-main-900는 Tailwind의 우선순위를 강제로 올려, Button 컴포넌트의 disabled 상태에서 의도한 텍스트 컬러 오버라이드(disabled:text-*)가 앞으로도 동작하지 않게 됩니다. 접근성(비활성 대비) 관점에서도 리스크가 있습니다. 우선순위 충돌을 피하기 위해 ! 제거를 권장합니다.

권장 변경:

-        skyblue: '!text-main-900 bg-main-200',
+        skyblue: 'text-main-900 bg-main-200',

그리고 Button 레벨에서 비활성 텍스트 컬러를 명시해두면 더 안전합니다(참고: src/shared/components/button/button/button.tsx):

-        disabled && 'cursor-not-allowed bg-gray-400',
+        disabled && 'cursor-not-allowed bg-gray-400 text-gray-200',

검증 스크립트:


🏁 Script executed:

#!/bin/bash
# !text-main-900 사용 중인 곳 점검
rg -n "!\s*text-main-900" src | sed -n '1,120p'

# disabled 상태에서 텍스트 컬러 지정 여부 점검
rg -n "disabled:.*text-" src/shared/components/button

Length of output: 215


skyblue 변형: ! 우선순위 제거 및 disabled 텍스트 컬러 추가 필요

검증 결과, !text-main-900는 오직 아래 한 곳에만 사용되고 있으며(disabled 상태에서 텍스트 오버라이드가 동작하지 않는 원인이 됩니다), Button 컴포넌트 레벨에서 disabled 텍스트 컬러 지정도 되어 있지 않습니다.

  • src/shared/components/button/button/styles/button-variants.ts:10
    -        skyblue: '!text-main-900 bg-main-200',
    +        skyblue: 'text-main-900 bg-main-200',
  • src/shared/components/button/button/button.tsx (disabled 처리 부분)
    -        disabled && 'cursor-not-allowed bg-gray-400',
    +        disabled && 'cursor-not-allowed bg-gray-400 text-gray-200',

이 변경을 통해 disabled 상태에서도 의도한 텍스트 컬러 오버라이드가 정상 동작하며, 접근성 대비(비활성 대비) 리스크를 해소할 수 있습니다.

🤖 Prompt for AI Agents
In src/shared/components/button/button/styles/button-variants.ts around line 10,
the skyblue variant currently uses a forced-priority class `!text-main-900`
which prevents disabled-state text color overrides; remove the leading `!` so it
becomes `text-main-900`. Additionally, update
src/shared/components/button/button/button.tsx in the disabled handling to
explicitly set a disabled text color class (e.g., `text-disabled-...` or the
appropriate theme token) when `disabled` is true so the disabled color takes
precedence; ensure the disabled class is applied after variant classes or via
conditional concatenation to guarantee override.

white: 'bg-white text-gray-700',
skyblueBorder: 'bg-main-200 text-main-900 outline outline-main-900',
gray2: 'bg-background text-gray-700',
disabled: 'bg-gray-100 text-gray-400',
},
size: {
M: 'w-full px-[0.8rem] py-[1.2rem]',
Expand Down
5 changes: 3 additions & 2 deletions src/shared/components/header/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@ const Header = () => {
const isFail = urlParams.get('type') === 'fail';
const isSignUp = pathname.includes(ROUTES.SIGNUP);
const isHome = pathname === ROUTES.HOME;
const isMatch = location.pathname === ROUTES.MATCH;
const isMatch = pathname === ROUTES.MATCH;
const isChatRoom = pathname === ROUTES.CHAT_ROOM;
const isEditProfile = pathname === ROUTES.PROFILE_EDIT;

return (
<header
className={clsx('header-layout', {
'bg-gray-black': isFail || isHome,
'bg-gray-white': isSignUp || isChatRoom,
'bg-gray-white': isSignUp || isChatRoom || isEditProfile,
'bg-gray-100': isMatch,
})}
>
Expand Down
2 changes: 1 addition & 1 deletion src/shared/routes/lazy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const Result = lazy(() => import('@pages/result/result'));

// Mypage
export const Profile = lazy(() => import('@pages/profile/profile'));
export const EditProfile = lazy(() => import('@pages/profile/edit-profile/edit-profile'));
export const EditProfile = lazy(() => import('@pages/edit-profile/edit-profile'));

// Chat
export const ChatList = lazy(() => import('@pages/chat/chat-list'));
Expand Down