Commit 71e6442e authored by Kim, Subin's avatar Kim, Subin
Browse files

MovieTable - 등록버튼 삭제 및 data에 따른 버튼 및 내용 보여주기

parent 98e723b3
...@@ -31,16 +31,12 @@ const MovieTable = ({ movieList }) => { ...@@ -31,16 +31,12 @@ const MovieTable = ({ movieList }) => {
} }
return ( return (
<table className={`table text-center ${styles.tableForm}`}> <table className={`table text-center align-middle ${styles.tableForm}`}>
<thead className={`table-dark ${styles.dNone}`}> <thead className={`table-dark ${styles.dNone}`}>
<tr> <tr>
<th>제목</th> <th className="col-md-5">제목</th>
<th>감독</th> <th className="col-md-4">감독</th>
<th>상영일</th> <th className="col-md-3">상영일</th>
<th>줄거리</th>
<th>포스터</th>
<th>스틸컷</th>
<th>예고편</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
...@@ -48,21 +44,12 @@ const MovieTable = ({ movieList }) => { ...@@ -48,21 +44,12 @@ const MovieTable = ({ movieList }) => {
<> <>
<tr className={styles.Row} data-bs-toggle="collapse" data-bs-target={"#movie" + movie.id}> <tr className={styles.Row} data-bs-toggle="collapse" data-bs-target={"#movie" + movie.id}>
<td className="d-inline-block d-md-table-cell">{movie.title}</td> <td className="d-inline-block d-md-table-cell">{movie.title}</td>
<td data-label="- " className={`d-inline-block d-md-table-cell ${styles.data}`}>케이트 쇼트랜드</td> <td className="d-none d-md-table-cell">{movie.director}</td>
<td data-label="/ " className={`d-inline-block d-md-table-cell ${styles.data}`}>{movie.release_date}</td> <td className="d-none d-md-table-cell">{movie.release_date}</td>
<td className="d-none d-md-table-cell">{movie.overview !== '' ? 'O' : 'X'}</td>
<td className="d-none d-md-table-cell">{movie.poster_path !== '' ? 'O' : 'X'}</td>
<td className="d-none d-md-table-cell">{movie.backdrop_path !== '' ? 'O' : 'X'}</td>
<td className="d-none d-md-table-cell">{movie.video !== false ? 'O' : 'X'}</td>
</tr> </tr>
<tr className={styles.Row}> <tr className={styles.Row}>
<td colSpan="7" className="collapse" id={"movie" + movie.id}> <td colSpan="3" className="collapse" id={"movie" + movie.id}>
<div className={`d-inline-block d-md-none ${styles.word} mb-2`}> <div className={`d-inline-block d-md-none ${styles.word} mb-2`}>{movie.director} / {movie.release_date}</div>
줄거리 - {movie.overview !== '' ? 'O' : 'X'} /
포스터 - {movie.poster_path !== '' ? 'O' : 'X'} /
스틸컷 - {movie.backdrop_path !== '' ? 'O' : 'X'} /
예고편 - {movie.video !== false ? 'O' : 'X'}
</div>
<div className="d-flex justify-content-end"> <div className="d-flex justify-content-end">
{movie.existed ? <button type="button" className="btn btn-danger" onClick={(e) => handleDelete(e, movie.id)}>삭제</button> {movie.existed ? <button type="button" className="btn btn-danger" onClick={(e) => handleDelete(e, movie.id)}>삭제</button>
: <button type="button" className="btn btn-primary" onClick={(e) => handleSubmit(e, movie.id)}>등록</button>} : <button type="button" className="btn btn-primary" onClick={(e) => handleSubmit(e, movie.id)}>등록</button>}
......
...@@ -20,11 +20,6 @@ ...@@ -20,11 +20,6 @@
& .Row { & .Row {
border-bottom: 2px solid; border-bottom: 2px solid;
& .data::before {
content: attr(data-label);
font-weight: bold;
}
} }
} }
}; };
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment