Skip to content

Commit

Permalink
Merge pull request #106 from Hooni07/dev-하태훈
Browse files Browse the repository at this point in the history
  • Loading branch information
minjo0n61 authored Mar 10, 2024
2 parents 4c5582e + 7a677d0 commit 93cee06
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 8 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ URL: https://sp4-team16-rolling.netlify.app
- 단위(px->rem) refactoring 진행
- Size, Color, Font, Option 등 상수화 작업 및 적용
- 일부 수치조정 과정에서 발생하는 디자인 오류 수정 및 개선
- 코드 스타일링: 불필요한 코드 제거 및 error 반환 방식 통일
- 팀 repository 생성 및 issues, label 등 초기 세팅 설정
- issues 항목 설정
- label 카테고리 생성
Expand Down
6 changes: 4 additions & 2 deletions src/components/EditMessage/EditMessage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@ const FormContainer = styled.div`

function EditMessage() {
const [buttonDisabled, setButtonDisabled] = useState(true);
console.log(buttonDisabled);

return (
<div>
<Header />
<FormContainer>
<EditForm isBtnDisabled={(isContent) => setButtonDisabled(isContent)} />
<EditForm
isBtnDisabled={(isContent) => setButtonDisabled(isContent)}
disabled={buttonDisabled}
/>
</FormContainer>
</div>
);
Expand Down
1 change: 0 additions & 1 deletion src/components/WritingMessage/WritingForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,6 @@ function WritingForm({ isBtnDisabled }) {
content: contents,
font: fonts,
};
console.log(data);
const response = await submitMessagePost(recipientID, data);
return response.recipientId;
}}
Expand Down
2 changes: 1 addition & 1 deletion src/components/WritingMessage/WritingMessage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ const FormContainer = styled.div`

function WritingMessage() {
const [buttonDisabled, setButtonDisabled] = useState(true);
console.log(buttonDisabled);

return (
<div>
<Header />
<FormContainer>
<WritingForm
isBtnDisabled={(isContent) => setButtonDisabled(isContent)}
disabled={buttonDisabled}
/>
</FormContainer>
</div>
Expand Down
3 changes: 2 additions & 1 deletion src/components/list/RecipientCard.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { useState, useEffect } from 'react';
import { useNavigate } from 'react-router-dom';

import styled, { css } from 'styled-components';
import WrittenByIcons from '../post/subheader/WrittenByIcons';
import { getAllMessages } from '../../api/GetApi';
Expand All @@ -22,7 +23,7 @@ function RecipientCard({ recipient }) {
const result = await getAllMessages(recipient.id);
setMessages(result.results);
} catch (error) {
console.error('메시지를 불러오는데 실패했습니다:', error);
throw new Error('메시지를 불러오는데 실패했습니다:', error);
}
};

Expand Down
2 changes: 1 addition & 1 deletion src/components/post/subheader/EmojiDropDown.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ function EmojiDropDown() {
}));
setBadges(data);
} catch (error) {
console.error('Failed to fetch data', error);
throw new Error('Failed to fetch data', error);
}
};

Expand Down
2 changes: 1 addition & 1 deletion src/pages/List.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function List() {
setPopularRecipients(sortedByPopularity);
setRecentRecipients(sortedByRecent);
} catch (error) {
console.error('롤링페이퍼를 불러오지 못했습니다.', error);
throw new Error('롤링페이퍼를 불러오지 못했습니다.', error);
}
};

Expand Down
2 changes: 1 addition & 1 deletion src/pages/PostId.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ function PostId() {
const result = await getRecipientData(id);
setData(result);
} catch (error) {
// console.error(error);
throw new Error('데이터를 불러오지 못했습니다.', error);
}
};

Expand Down

0 comments on commit 93cee06

Please sign in to comment.