diff --git a/frontend/src/Router.jsx b/frontend/src/Router.jsx index 20db9d1..9efe647 100644 --- a/frontend/src/Router.jsx +++ b/frontend/src/Router.jsx @@ -5,7 +5,6 @@ import HomePage from './pages/HomePage'; import NotFoundPage from './pages/NotFoundPage'; import { lazy, Suspense } from 'react'; import MyPageLayout from './components/Layout/MyPageLayout'; -// import LivePage from './pages/LivePage'; import ErrorPage from './pages/ErrorPage'; import { LectureLayout } from './components/Layout'; diff --git a/frontend/src/components/Article/ArticleDetail/ArticleDetail.jsx b/frontend/src/components/Article/ArticleDetail/ArticleDetail.jsx index 0d6150e..83914cc 100644 --- a/frontend/src/components/Article/ArticleDetail/ArticleDetail.jsx +++ b/frontend/src/components/Article/ArticleDetail/ArticleDetail.jsx @@ -75,9 +75,8 @@ export default function ArticleDetail({ )} -
{content}
-{content}
+ {/* TODO: 이 부분에서 answer 만든다음 뒤로가기로 나갔다가 돌아오면 0.1초 정도 input 칸이 보였다가 answer 로 바뀜. 수정필요 */} {isQna && (submittedAnswer && !isEditing ? ( diff --git a/frontend/src/components/Article/ArticleDetail/ArticleDetail.module.css b/frontend/src/components/Article/ArticleDetail/ArticleDetail.module.css index 50fa354..f20f07d 100644 --- a/frontend/src/components/Article/ArticleDetail/ArticleDetail.module.css +++ b/frontend/src/components/Article/ArticleDetail/ArticleDetail.module.css @@ -53,7 +53,7 @@ line-height: 1.4; font-weight: 400; margin: 0; - white-space: pre-line; + white-space: pre-wrap; } .icon { @@ -61,6 +61,7 @@ } .actionGroup { + flex-shrink: 0; display: flex; align-items: end; gap: 20px; diff --git a/frontend/src/components/Article/ArticleDetail/ArticleDetailAnswer/ArticleDetailAnswer.module.css b/frontend/src/components/Article/ArticleDetail/ArticleDetailAnswer/ArticleDetailAnswer.module.css index 06522dc..6472002 100644 --- a/frontend/src/components/Article/ArticleDetail/ArticleDetailAnswer/ArticleDetailAnswer.module.css +++ b/frontend/src/components/Article/ArticleDetail/ArticleDetailAnswer/ArticleDetailAnswer.module.css @@ -27,6 +27,7 @@ } .actionGroup { + flex-shrink: 0; display: flex; gap: 12px; } diff --git a/frontend/src/components/Article/ArticleDetail/ArticleDetailAnswer/ArticleDetailAnswerInput.jsx b/frontend/src/components/Article/ArticleDetail/ArticleDetailAnswer/ArticleDetailAnswerInput.jsx index 284401a..9b90b5c 100644 --- a/frontend/src/components/Article/ArticleDetail/ArticleDetailAnswer/ArticleDetailAnswerInput.jsx +++ b/frontend/src/components/Article/ArticleDetail/ArticleDetailAnswer/ArticleDetailAnswerInput.jsx @@ -3,6 +3,8 @@ import { useAnswerWrite } from '../../../../hooks/api/useAnswerWrite'; import { useParams } from 'react-router-dom'; import { useState } from 'react'; +import SendIcon from '/src/assets/icons/send.svg?react'; + export default function ArticleDetailAnswerInput({ onSubmit, initialAnswer }) { const { answerWrite } = useAnswerWrite(); const { questionId } = useParams(); @@ -19,19 +21,19 @@ export default function ArticleDetailAnswerInput({ onSubmit, initialAnswer }) { onSubmit={handleSubmit} className={styles.answer} > - {/* TODO: 여기 css 부분은 내가 임의로 넣었음 */} setNewAnswer(e.target.value)} - placeholder="답변 작성" + placeholder="답변 작성하기" className={styles.input} /> ); diff --git a/frontend/src/components/Article/ArticleDetail/ArticleDetailAnswer/ArticleDetailAnswerInput.module.css b/frontend/src/components/Article/ArticleDetail/ArticleDetailAnswer/ArticleDetailAnswerInput.module.css index 6e2cbb5..cb2b8b9 100644 --- a/frontend/src/components/Article/ArticleDetail/ArticleDetailAnswer/ArticleDetailAnswerInput.module.css +++ b/frontend/src/components/Article/ArticleDetail/ArticleDetailAnswer/ArticleDetailAnswerInput.module.css @@ -1,6 +1,6 @@ .answer { - border: 1px solid #ccc; - padding: 16px; + border: 1px solid var(--border-color); + padding: 8px; border-radius: 8px; display: flex; align-items: center; @@ -17,14 +17,13 @@ } .button { - padding: 8px 16px; - font-size: 16px; - line-height: 1.4; - font-weight: 700; + display: flex; + justify-content: center; + align-items: center; + padding: 12px 16px; background-color: var(--primary-color); - color: var(--on-primary); stroke: var(--on-primary); - border: 1px solid var(--primary-color); + border: none; border-radius: 8px; cursor: pointer; } diff --git a/frontend/src/components/Article/CreateArticle/CreateArticle.jsx b/frontend/src/components/Article/CreateArticle/CreateArticle.jsx index c5be647..f45e73a 100644 --- a/frontend/src/components/Article/CreateArticle/CreateArticle.jsx +++ b/frontend/src/components/Article/CreateArticle/CreateArticle.jsx @@ -34,6 +34,7 @@ export default function CreateArticle({ topic, title, onSubmit }) { 제목 제목 제목 setNewComment(e.target.value)} - placeholder="답변 작성" + placeholder="댓글 수정하기" className={styles.input} required /> @@ -48,30 +50,38 @@ export default function FreeboardComment({ content, author, onDeleteSubmit, onEd type="submit" className={styles.button} > - 작성 +{content}
- -{content}
@@ -70,8 +63,9 @@ export default function FreeboardDetail({ topic, title, author, content, onDelet content={comment.content} author={comment.name} commentId={comment.id} - onDeleteSubmit={handleDeleteSubmit} - onEditSubmit={handleEditSubmit} + isMine={comment.mine} + onDeleteSubmit={refetch} + onEditSubmit={refetch} /> ))}