Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

편집 취소버튼 눌러도 저장 #103

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/components/Mypage/ProfileEdit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { LOAD_USER_REQUEST } from 'reducers/users';
import { Form, Input, TextArea, Icon } from 'semantic-ui-react';
import * as Styled from './ProfileEditStyled';

const ProfileEdit = () => {
const ProfileEdit = (props) => {
const dispatch = useDispatch();
const formData = new FormData();
const { user, updateUserDone } = useSelector((state) => state.authentication);
Expand Down Expand Up @@ -107,7 +107,8 @@ const ProfileEdit = () => {
/>
</Styled.AvatarFormContainer>
<Styled.ActionContainer>
<Styled.BackButton>취소</Styled.BackButton>
<Styled.BackButton onClick={props.onChangeMode}>취소</Styled.BackButton>

<Styled.EditButton>저장</Styled.EditButton>
Copy link
Member

Choose a reason for hiding this comment

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

p2: 저장버튼은 form submit 용이면 option에 type="submit" 이런걸 넣어주는게 좋습니다
back button은 반대로 form submit 을 안하니까 type="button" 으로 지정해줍시다.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

댑악 넹

</Styled.ActionContainer>

Expand Down
4 changes: 4 additions & 0 deletions src/components/Mypage/ProfileEditStyled.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ export const BackButton = styled.button`
font-size: 0.5rem;
background-color: white;
color: #707bf3;
cursor: pointer;
@media screen and (max-width: 767px) {
width: 2.5rem;
height: 1.6rem;
Expand All @@ -91,6 +92,7 @@ export const EditButton = styled.button`
padding: 0;
background-color: #707bf3;
color: white;
cursor: pointer;
@media screen and (max-width: 767px) {
width: 2.5rem;
height: 1.6rem;
Expand Down Expand Up @@ -143,6 +145,7 @@ export const TagButton = styled.button`
margin-bottom: 0.5rem;
background-color: white;
color: #707bf3;
cursor: pointer;
`;

export const TagSubmitButton = styled.button`
Expand All @@ -156,6 +159,7 @@ export const TagSubmitButton = styled.button`
margin-bottom: 0.5rem;
background-color: white;
color: #707bf3;
cursor: pointer;
`;

export const TagButton2 = styled.button`
Expand Down
1 change: 1 addition & 0 deletions src/components/Mypage/ProfileInfoStyled.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ export const EditButton = styled.button`
position: absolute;
top: 0;
right: 1.8rem;
cursor: pointer;
`;
export const IconContainer = styled.div`
width: 12rem;
Expand Down