Skip to content

Commit

Permalink
Merge pull request #114 from teamViNO/feature-006
Browse files Browse the repository at this point in the history
  • Loading branch information
whistleJs authored Feb 19, 2024
2 parents d74c9cc + c733aec commit 6ee1c46
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/components/NicknameModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ const NicknameModal = () => {
const { createToast } = useCreateToast();

const setUserInfo = useSetRecoilState(userInfoState);
const NickNameRegex = /^[a-zA-Z0-9가-힣\s]*$/;
const testNickNameRegex = NickNameRegex.test(name);

const refreshMyInfo = async () => {
try {
Expand Down Expand Up @@ -93,6 +95,11 @@ const NicknameModal = () => {
/7(공백포함)
</InputNickNameMessage>
</TextDiv>
{!testNickNameRegex && (
<WarningMessage>
*아쉽지만,이모티콘은 사용할 수 없어요
</WarningMessage>
)}
{name ? (
<SucButton type="submit" onClick={onApply} style={{ marginTop: 12 }}>
등록하기
Expand Down Expand Up @@ -199,3 +206,10 @@ const TextDiv = styled.div`
border-radius: 12px;
margin-top: 48px;
`;

export const WarningMessage = styled.span`
align-self: flex-start;
margin: 0px 0px 12px 16px;
color: ${theme.color.red};
${theme.typography.Body3}
`;

0 comments on commit 6ee1c46

Please sign in to comment.