Skip to content

Commit

Permalink
Merge pull request #90 from tempfiles-Team/67-checkpw-창에서-엔터로-입력-전송
Browse files Browse the repository at this point in the history
feat: enter event 추가
  • Loading branch information
ananjaemin committed Nov 17, 2022
2 parents ef9d533 + 8a6b285 commit 1128bd8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/pages/checkpw/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export const CheckPasswordPage: React.FC = () => {
});
}
};

useEffect(() => {
const getFileProps = async () => {
await axios({
Expand All @@ -79,7 +80,7 @@ export const CheckPasswordPage: React.FC = () => {
});
};
getFileProps();
});
}, [checkfileid, navigate]);
return (
<S.CheckPasswordPageContainer>
<FileBox>
Expand All @@ -88,6 +89,11 @@ export const CheckPasswordPage: React.FC = () => {
</FileBox>
<S.PasswordInputSection>
<S.CheckPasswordInput
onKeyPress={(e: any) => {
if (e.key === 'Enter') {
passwordCheck();
}
}}
onChange={(text) => {
setPassword(text.target.value.replace(/(\s*)/g, ''));
}}
Expand Down

0 comments on commit 1128bd8

Please sign in to comment.