Skip to content

Commit 1bd1d97

Browse files
authored
Merge pull request #84 from oodd-team/feat/OD-132
[OD-132] profileEdit UI 수정
2 parents 62b1633 + 0d6b67d commit 1bd1d97

5 files changed

Lines changed: 18 additions & 5 deletions

File tree

src/pages/AccountCancel/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import back from '../../assets/arrow/left.svg';
1111
import BottomButton from '../../components/BottomButton';
1212
import { patchUserWithdrawApi } from '../../apis/user';
1313

14+
1415
const AccountCancel: React.FC = () => {
1516
const [isChecked, setIsChecked] = useState(false);
1617
const navigate = useNavigate();

src/pages/AccountSetting/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const AccountSetting: React.FC = () => {
2525
useEffect(() => {
2626
const getUserInfo = async () => {
2727
try {
28-
const storedUserId = localStorage.getItem('my_id');
28+
const storedUserId = Number(localStorage.getItem('my_id'));
2929
if (!storedUserId) {
3030
console.error('User is not logged in');
3131
return;

src/pages/MyPage/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ const MyPage: React.FC = () => {
7878
// 사용자 정보 조회 API
7979
const fetchUserInfo = async () => {
8080
try {
81-
const storedUserId = localStorage.getItem('my_id');
81+
const storedUserId = Number(localStorage.getItem('my_id'));
8282
if (!storedUserId) {
8383
console.error('User ID not found in localStorage');
8484
return;
@@ -94,7 +94,7 @@ const MyPage: React.FC = () => {
9494
// 게시물 리스트 조회 API
9595
const fetchPostList = async () => {
9696
try {
97-
const storedUserId = localStorage.getItem('my_id');
97+
const storedUserId = Number(localStorage.getItem('my_id'));
9898
if (!storedUserId) {
9999
console.error('User ID not found in localStorage');
100100
return;

src/pages/ProfileEdit/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
CameraIcon,
1111
UserInfo,
1212
Username,
13+
EmailInput
1314
} from './styles';
1415
import { StyledText } from '../../components/Text/StyledText';
1516
import theme from '../../styles/theme';
@@ -51,7 +52,7 @@ const ProfileEdit: React.FC = () => {
5152
useEffect(() => {
5253
const getUserInfo = async () => {
5354
try {
54-
const storedUserId = localStorage.getItem('my_id'); // 사용자 ID 가져오기
55+
const storedUserId = Number(localStorage.getItem('my_id'));
5556
if (!storedUserId) {
5657
console.error('User ID not found in localStorage');
5758
return;
@@ -216,7 +217,7 @@ const ProfileEdit: React.FC = () => {
216217
<StyledText $textTheme={{ style: 'body2-regular', lineHeight: 0 }} color={theme.colors.gray3}>
217218
이메일
218219
</StyledText>
219-
<Input type="email" value={email} onChange={(e) => setEmail(e.target.value)} />
220+
<EmailInput type="email" value={email} onChange={(e) => setEmail(e.target.value)} />
220221
</Row>
221222
<BottomButton content="완료" onClick={handleSave} />
222223
</ProfileEditContainer>

src/pages/ProfileEdit/styles.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,17 @@ export const Row = styled.div`
8080
}
8181
`;
8282

83+
export const EmailInput = styled.input`
84+
margin-bottom: 120px;
85+
width: 100%; /* Row의 padding에 맞춰 꽉 채우기 */
86+
padding: 25px; /* 10px padding */
87+
border: 0px;
88+
box-sizing: border-box;
89+
border-radius: 10px;
90+
background-color: #f0f0f0; /* 박스 내부 회색 배경 */
91+
text-align: left;
92+
`;
93+
8394
export const FileInput = styled.input`
8495
display: none;
8596
`;

0 commit comments

Comments
 (0)