Merge branch 'fe/freeBoardLinebreak' into 'frontend'
[Front-End] fix: 자유게시판 줄바꿈 처리 See merge request s11-webmobile1-sub2/S11P12A701!179
This commit is contained in:
commit
9e08857722
@ -1,11 +1,10 @@
|
||||
import BackIcon from '/src/assets/icons/back.svg?react';
|
||||
import { Link } from 'react-router-dom';
|
||||
import styles from './FreeboardDetail.module.css';
|
||||
import FreeboardCommentInput from './FreeDetailComments/FreeboardCommentInput';
|
||||
import FreeboardComment from './FreeDetailComments/FreeboardComment';
|
||||
import { useComments } from '../../../hooks/api/useComments';
|
||||
import { useCommentWrite } from '../../../hooks/api/useCommentWrite';
|
||||
import { useParams } from 'react-router-dom';
|
||||
import ArticleDetail from '../ArticleDetail/ArticleDetail';
|
||||
|
||||
export default function FreeboardDetail({ topic, title, author, content, onDelete, isMine }) {
|
||||
const { freeboardId } = useParams();
|
||||
@ -20,43 +19,15 @@ export default function FreeboardDetail({ topic, title, author, content, onDelet
|
||||
|
||||
return (
|
||||
<div className={styles.freeboardDetail}>
|
||||
<header className={styles.header}>
|
||||
<div className={styles.headerInside}>
|
||||
<Link
|
||||
to={'..'}
|
||||
className={styles.goBack}
|
||||
>
|
||||
<BackIcon />
|
||||
<span>{topic}</span>
|
||||
</Link>
|
||||
<div>
|
||||
<h1 className={styles.title}>{title}</h1>
|
||||
{author && <span className={styles.author}>{author}</span>}
|
||||
</div>
|
||||
</div>
|
||||
{isMine && (
|
||||
<div className={styles.actionGroup}>
|
||||
<Link
|
||||
to="edit"
|
||||
className={styles.edit}
|
||||
state={{ title: title, content: content }}
|
||||
>
|
||||
수정
|
||||
</Link>
|
||||
<button
|
||||
type="button"
|
||||
className={styles.delete}
|
||||
onClick={onDelete}
|
||||
>
|
||||
<div>삭제</div>
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
</header>
|
||||
<div>
|
||||
<p className={styles.content}>{content}</p>
|
||||
</div>
|
||||
|
||||
<ArticleDetail
|
||||
topic={topic}
|
||||
title={title}
|
||||
author={author}
|
||||
content={content}
|
||||
onDelete={onDelete}
|
||||
isQna={false}
|
||||
isMine={isMine}
|
||||
/>
|
||||
{comments && (
|
||||
<div className={styles.commentWrapper}>
|
||||
{comments.map((comment) => (
|
||||
|
@ -9,7 +9,7 @@
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/*
|
||||
.header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
@ -113,7 +113,7 @@
|
||||
|
||||
.delete {
|
||||
color: var(--error-color);
|
||||
}
|
||||
} */
|
||||
|
||||
.commentWrapper {
|
||||
display: flex;
|
||||
|
Loading…
Reference in New Issue
Block a user