Skip to content

Conversation

@ryanlee911
Copy link

1. 무엇을?

axios를 활용해 json-server와 통신
회원가입 시 중복 아이디 확인 → 에러 메시지 표시
로그인 성공 시 localStorage에 사용자 정보 저장
로그인 유지 기능 추가 (localStorage 활용)

2. 스크린샷

스크린샷 2025-05-19 091659
스크린샷 2025-05-19 091731

Copy link
Member

@yezzan9 yezzan9 left a comment

Choose a reason for hiding this comment

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

6주차 과제도 수고하셨습니다 !!
전체적으로 기능 구현은 잘 되어있는데 스타일코드가 정돈되어있지 않거나, 컴포넌트 재사용면에서 조금 아쉬운 것 같아요🥺 해당부분 리팩토링 진행해주시면 더 좋은 코드가 될 것 같습니다 !!

Comment on lines +35 to +48
<div style={{ minHeight: '100vh', display: 'flex', alignItems: 'center', justifyContent: 'center', background: '#fff' }}>
<div className="form-box" style={{ minWidth: 480, maxWidth: 520, background: '#f3f3f3', padding: '40px 40px', borderRadius: '12px', boxShadow: '0 2px 12px #0001' }}>
<div style={{ textAlign: 'center', fontWeight: 'bold', fontSize: '2.5rem', marginBottom: 40, letterSpacing: '-2px' }}>로그인</div>
<form onSubmit={handleLogin} style={{ display: 'flex', flexDirection: 'row', alignItems: 'center', gap: 24 }}>
<div style={{ flex: 1, display: 'flex', flexDirection: 'column', gap: 22 }}>
<div style={{ display: 'flex', alignItems: 'center', gap: 12 }}>
<label htmlFor="id" style={{ width: 90, fontWeight: 600, fontSize: '1.35rem', textAlign: 'right' }}>아이디</label>
<input id="id" type="text" value={id} onChange={e => setId(e.target.value)} required style={{ flex: 1, height: 40, borderRadius: 8, border: '2px solid #444', padding: '0 12px', fontSize: '1.2rem', background: '#fff' }} />
</div>
<div style={{ display: 'flex', alignItems: 'center', gap: 12 }}>
<label htmlFor="pw" style={{ width: 90, fontWeight: 600, fontSize: '1.35rem', textAlign: 'right' }}>비밀번호</label>
<input id="pw" type="password" value={pw} onChange={e => setPw(e.target.value)} required style={{ flex: 1, height: 40, borderRadius: 8, border: '2px solid #444', padding: '0 12px', fontSize: '1.2rem', background: '#fff' }} />
</div>
</div>
Copy link
Member

Choose a reason for hiding this comment

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

styled-components가 아닌 인라인 스타일로 구현한 이유가 있을까용?-?
인라인 스타일의 경우 가독성이 좋지 않아서 ㅠ,ㅠ styled-components를 사용하거나, 기존에 구현하신 것처럼 별도의 css파일로 분리하면 좋을 것 같아요!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants