Skip to content

Commit 2b4c1db

Browse files
committed
feat: 비밀번호 필터링 기능, 업로드 실패시 메인화면으로 복귀 기능 추가
1 parent 7d16fed commit 2b4c1db

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/pages/main/index.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ export const MainPage: React.FC = () => {
2828
const [expireTimeBoolean, setExpireTimeBoolean] = useState(false);
2929
const [downloadCountBoolean, setDownloadCountBoolean] = useState(false);
3030
const [passwordBoolean, setPasswordBoolean] = useState(false);
31+
const [passwordFilter, setPasswordFilter] = useState(true);
3132

3233
const [expireTime, setExpireTime] = useState(1);
3334
const [downloadCount, setDownloadCount] = useState(100);
@@ -98,6 +99,7 @@ export const MainPage: React.FC = () => {
9899
autoClose: 3000,
99100
position: toast.POSITION.BOTTOM_RIGHT,
100101
});
102+
setUploading(true);
101103
});
102104
} else {
103105
toast.error('파일을 선택해주세요!', {
@@ -159,9 +161,10 @@ export const MainPage: React.FC = () => {
159161
)}
160162
{passwordBoolean && (
161163
<PasswordInput
162-
onChange={(text) => {
163-
setPassword(text.target.value.replace(/(\s*)/g, ''));
164-
}}
164+
type={passwordFilter ? 'password' : 'text'}
165+
isFillter={passwordFilter}
166+
setPassword={setPassword}
167+
setPasswordFilter={setPasswordFilter}
165168
placeholder="비밀번호를 입력해주세요."
166169
/>
167170
)}

0 commit comments

Comments
 (0)