Skip to content

Commit a67a3df

Browse files
committed
refactor: 네브바 수정
1 parent 052628d commit a67a3df

File tree

3 files changed

+32
-45
lines changed

3 files changed

+32
-45
lines changed

src/components/Navbar/Navbar.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,8 @@ import classNames from "classnames";
44

55
import styles from "@/components/Navbar/Navbar.module.scss";
66

7-
interface NavbarProps extends PropsWithChildren {
8-
className?: string;
9-
}
10-
11-
const Navbar = ({ children, className }: NavbarProps) => {
12-
return <div className={classNames(styles.Navbar, className)}>{children}</div>;
7+
const Navbar = ({ children }: PropsWithChildren) => {
8+
return <div className={styles.Navbar}>{children}</div>;
139
};
1410

1511
Navbar.LeftButton = ({

src/pages/ReceiptEditPage/ReceiptEditPage.module.scss

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,6 @@
3131
}
3232
}
3333

34-
.Navbar {
35-
padding-left: 0;
36-
padding-right: 0;
37-
}
38-
39-
.Container {
40-
z-index: 1;
41-
}
42-
4334
.Top {
4435
z-index: 1;
4536

src/pages/ReceiptEditPage/ReceiptEditPage.tsx

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,14 @@ const ReceiptEditPage = () => {
7979
};
8080

8181
return (
82-
<div className={styles.ReceiptEdit}>
83-
<div className={styles.Container}>
84-
<Navbar className={styles.Navbar}>
85-
<Navbar.LeftButton onClick={handleNavigateToHome}>
86-
<Icon name="leftArrow" />
87-
</Navbar.LeftButton>
88-
</Navbar>
89-
82+
<>
83+
<Navbar>
84+
<Navbar.LeftButton onClick={handleNavigateToHome}>
85+
<Icon name="leftArrow" />
86+
</Navbar.LeftButton>
87+
</Navbar>
88+
89+
<div className={styles.ReceiptEdit}>
9090
<div className={styles.Top}>
9191
<div className={styles.TitleBox}>
9292
<Text variant="titleM" color="primary" as="h1" truncated>
@@ -118,33 +118,33 @@ const ReceiptEditPage = () => {
118118
))}
119119
</div>
120120
</div>
121-
</div>
122121

123-
<div className={styles.Bottom}>
124-
{Object.values(focusState).some((isFocus) => isFocus) ? (
125-
<Button
126-
key="edit"
127-
text="수정하기"
128-
disabled={formData.some((item) => Object.values(item).some((value) => !value))}
129-
/>
130-
) : (
131-
<>
122+
<div className={styles.Bottom}>
123+
{Object.values(focusState).some((isFocus) => isFocus) ? (
132124
<Button
133-
key="scan"
134-
text="다시 스캔하기"
135-
variant="secondary"
136-
onClick={handleNavigateToHome}
137-
/>
138-
<Button
139-
key="confirm"
140-
text="정보가 맞아요"
125+
key="edit"
126+
text="수정하기"
141127
disabled={formData.some((item) => Object.values(item).some((value) => !value))}
142-
onClick={handleInfoRightClick}
143128
/>
144-
</>
145-
)}
129+
) : (
130+
<>
131+
<Button
132+
key="scan"
133+
text="다시 스캔하기"
134+
variant="secondary"
135+
onClick={handleNavigateToHome}
136+
/>
137+
<Button
138+
key="confirm"
139+
text="정보가 맞아요"
140+
disabled={formData.some((item) => Object.values(item).some((value) => !value))}
141+
onClick={handleInfoRightClick}
142+
/>
143+
</>
144+
)}
145+
</div>
146146
</div>
147-
</div>
147+
</>
148148
);
149149
};
150150

0 commit comments

Comments
 (0)