diff --git a/frontend/sweet-red-beans/src/components/GeneralBoard/GeneralBoard.js b/frontend/sweet-red-beans/src/components/GeneralBoard/GeneralBoard.js
index a69487b..84423fd 100644
--- a/frontend/sweet-red-beans/src/components/GeneralBoard/GeneralBoard.js
+++ b/frontend/sweet-red-beans/src/components/GeneralBoard/GeneralBoard.js
@@ -2,11 +2,10 @@ import React, {useEffect, useState} from "react";
import { Link } from "react-router-dom";
import Pagination from "../Pagination/Pagination";
import style from "../../css/GeneralBoardPage/GeneralBoard.module.css"
-import { useSelector } from "react-redux";
import axios from "axios";
import { parseDate } from "../../parseDate/parseDate";
-const GeneralBoard = ({searchWords, sort, cinemaName, cinemaArea, cinemaBranch}) => {
+const GeneralBoard = ({searchWords, sort}) => {
const [infos, setInfos] = useState([]);
const [limit, setLimit] = useState(15);
const [page, setPage] = useState(1);
@@ -14,7 +13,6 @@ const GeneralBoard = ({searchWords, sort, cinemaName, cinemaArea, cinemaBranch})
useEffect(()=>{
//처음에 최신순으로 요청
- console.log(searchWords, sort, cinemaName, cinemaArea, cinemaBranch);
axios.get('http://localhost:8080/general-board/search',{
withCredentials: true,
params: {
@@ -31,7 +29,6 @@ const GeneralBoard = ({searchWords, sort, cinemaName, cinemaArea, cinemaBranch})
}, [])
useEffect(()=>{
- console.log(searchWords, sort, cinemaName, cinemaArea, cinemaBranch);
let searchWord = ""
if(searchWords.length!==0) {
searchWord = searchWords[searchWords.length-1]
@@ -52,21 +49,7 @@ const GeneralBoard = ({searchWords, sort, cinemaName, cinemaArea, cinemaBranch})
return (
- {/*
*/}
-
+ {}
제목
@@ -77,7 +60,7 @@ const GeneralBoard = ({searchWords, sort, cinemaName, cinemaArea, cinemaBranch})
{infos.slice(offset, offset + limit).map((item, index) => (
-
+
{item.title}
{item.user_status === "정지" || item.user_status === "탈퇴" ? "(알수없음)" : item.nickname}
@@ -90,7 +73,7 @@ const GeneralBoard = ({searchWords, sort, cinemaName, cinemaArea, cinemaBranch})
-
+
diff --git a/frontend/sweet-red-beans/src/components/GeneralBoard/GeneralBoardDetailPage.js b/frontend/sweet-red-beans/src/components/GeneralBoard/GeneralBoardDetailPage.js
index 2774434..2d4b748 100644
--- a/frontend/sweet-red-beans/src/components/GeneralBoard/GeneralBoardDetailPage.js
+++ b/frontend/sweet-red-beans/src/components/GeneralBoard/GeneralBoardDetailPage.js
@@ -2,7 +2,6 @@ import React, {useEffect, useMemo, useState}from "react";
import { Link, unstable_HistoryRouter } from "react-router-dom";
import Comment from "../Comment/Comment";
import { useParams } from "react-router";
-import { useSelector } from "react-redux";
import axios from "axios";
import { useNavigate } from "react-router";
import style from "../../css/GeneralBoardPage/GeneralBoardDetailPage.module.css";
@@ -11,12 +10,11 @@ import { parseDate } from "../../parseDate/parseDate";
const GeneralBoardDetailPage = () => {
let navigation = useNavigate();
+
const {postid} = useParams();
- //const userid = useSelector(state => state.user.user_id);
const [detailInfo, setDetailInfo] = useState({});
const [comments, setComments] = useState([]);
const [commentsIsHere, setCommentsIsHere] = useState(false);
-
const[commentContent, setCommentContent] = useState("");
//처음 조회
@@ -158,7 +156,7 @@ const GeneralBoardDetailPage = () => {
-
+
diff --git a/frontend/sweet-red-beans/src/components/GeneralBoard/GeneralBoardPage.js b/frontend/sweet-red-beans/src/components/GeneralBoard/GeneralBoardPage.js
index 7475113..6447caa 100644
--- a/frontend/sweet-red-beans/src/components/GeneralBoard/GeneralBoardPage.js
+++ b/frontend/sweet-red-beans/src/components/GeneralBoard/GeneralBoardPage.js
@@ -1,26 +1,16 @@
import React, { useEffect, useState, useMemo, useCallback } from "react";
import { useSelector, useDispatch } from "react-redux";
-import { CGVarea, CGV0, CGV1, CGV2, CGV3, CGV4, CGV5, CGV6, CGV7, CGV8 } from "../../cinemas/CGVcinemas";
-import { LCarea, LC0, LC1, LC2, LC3, LC4, LC5, LC6, LC7 } from "../../cinemas/LCcinemas";
-import { MBarea, MB0, MB1, MB2, MB3, MB4, MB5, MB6 } from "../../cinemas/MBcinemas";
-import { CQarea, CQ0, CQ1, CQ2, CQ3, CQ4 } from "../../cinemas/CQcinemas";
import GeneralBoard from "./GeneralBoard";
-import { Link } from "react-router-dom";
-import { INFO } from "../../actions/types";
-import axios from "axios";
import style from "../../css/GeneralBoardPage/GeneralBoardPage.module.css";
const GeneralBoardPage = () => {
const dispatch = useDispatch();
- const [array, setArray] = useState([]);
-
//이제까지 검색한 것
const [searchWords, setSearchWords] = useState([]);
//search
const [search, setSearch] = useState("");
-
const sorts = ["제목+내용", "제목", "내용", "작성자"];
const [sort, setSort] = useState("제목+내용");
diff --git a/frontend/sweet-red-beans/src/components/GeneralBoard/GeneralBoardWritePage.js b/frontend/sweet-red-beans/src/components/GeneralBoard/GeneralBoardWritePage.js
index 749aede..89bb4fa 100644
--- a/frontend/sweet-red-beans/src/components/GeneralBoard/GeneralBoardWritePage.js
+++ b/frontend/sweet-red-beans/src/components/GeneralBoard/GeneralBoardWritePage.js
@@ -1,18 +1,11 @@
import React, { useEffect, useState } from "react";
-import { CGVarea, CGV0, CGV1, CGV2, CGV3, CGV4, CGV5, CGV6, CGV7, CGV8 } from "../../cinemas/CGVcinemas";
-import { LCarea, LC0, LC1, LC2, LC3, LC4, LC5, LC6, LC7 } from "../../cinemas/LCcinemas";
-import { MBarea, MB0, MB1, MB2, MB3, MB4, MB5, MB6 } from "../../cinemas/MBcinemas";
-import { CQarea, CQ0, CQ1, CQ2, CQ3, CQ4 } from "../../cinemas/CQcinemas";
-import { Link } from "react-router-dom";
import axios from "axios";
import { useNavigate } from "react-router";
-import { useSelector } from "react-redux";
import style from "../../css/GeneralBoardPage/GeneralBoardWritePage.module.css";
const GeneralBoardWritePage = () => {
let navigation = useNavigate();
- const [array, setArray] = useState([]);
const [title, setTitle] = useState("");
const [content, setContent] = useState("");
@@ -25,13 +18,9 @@ const GeneralBoardWritePage = () => {
}, [])
const contentChange = (e) => {
- // const a = content.replace("\n",
)
- // console.log(a);
setContent(e.target.value);
}
- //const userId = useSelector(state => state.user.user_id);
-
//글쓰기 버튼 눌렀을 때
const writeClick = () => {
if (title === "" || content === ""){
@@ -42,7 +31,6 @@ const GeneralBoardWritePage = () => {
//이미지 파일 없을 때
if(imgFile === null){
- fd.append("user_id", "1");
fd.append("title", title);
fd.append("content", content);
@@ -55,7 +43,7 @@ const GeneralBoardWritePage = () => {
.then(response => {
if(response.data.result) {
alert("게시글이 성공적으로 작성되었습니다.");
- navigation('/GeneralBoard');
+ navigation('/generalBoard');
}
else {
alert("게시글 작성을 실패했습니다.")
@@ -70,7 +58,6 @@ const GeneralBoardWritePage = () => {
//이미지 파일 있을 때
else {
fd.append("image_url", imgFile[0])
- fd.append("user_id", "1");
fd.append("title", title);
fd.append("content", content);
@@ -83,7 +70,7 @@ const GeneralBoardWritePage = () => {
.then(response => {
if(response.data.result) {
alert("게시글이 성공적으로 작성되었습니다.");
- navigation('/GeneralBoard');
+ navigation('/generalBoard');
}
else {
alert("게시글 작성을 실패했습니다.")
diff --git a/frontend/sweet-red-beans/src/components/MainContent/MainContent.js b/frontend/sweet-red-beans/src/components/MainContent/MainContent.js
index 5eac6e2..1ec52e2 100644
--- a/frontend/sweet-red-beans/src/components/MainContent/MainContent.js
+++ b/frontend/sweet-red-beans/src/components/MainContent/MainContent.js
@@ -35,15 +35,15 @@ const MainContent = () => {
}/>
}/>
}/>
- }/>
- }/>
- }/>
+ }/>
+ }/>
+ }/>
}/>
}/>
}>
}/>
}/>
- }/>
+ }/>
}/>
}/>