diff --git a/src/App.js b/src/App.js index 56efc74..6c4c079 100644 --- a/src/App.js +++ b/src/App.js @@ -5,6 +5,7 @@ import Signin from "./component/project/signin/signin"; import Signup from "./component/project/signup/signup"; import Proboard from "./component/project/board/proboard"; import Sellerboard from "./component/project/board/sellerboard"; +import Community from "./component/project/community"; import "./App.css"; function App() { @@ -18,6 +19,7 @@ function App() { } /> } /> } /> + } /> diff --git a/src/component/project/board/proboard/index.js b/src/component/project/board/proboard/index.js index 29f2de6..a2ba720 100644 --- a/src/component/project/board/proboard/index.js +++ b/src/component/project/board/proboard/index.js @@ -12,28 +12,6 @@ const Proboard = () => { justify-content: space-between; margin-top: 300px; `; - const SignupInput = styled.input` - color: #000; - width: 294px; - height: 388px; - border-radius: 10px; - border: 0px; - padding: 20px; - font-feature-settings: "clig" off, "liga" off; - font-family: Inter; - font-size: 20px; - font-style: normal; - font-weight: 600; - line-height: 20px; - margin-bottom: 16px; - background: #d9d9d9; - ::placeholder { - color: lightgray; - font-size: 20px; - font-style: normal; - font-weight: 700; - } - `; return ( <> diff --git a/src/component/project/community/component.js b/src/component/project/community/component.js index e69de29..d4aa7bc 100644 --- a/src/component/project/community/component.js +++ b/src/component/project/community/component.js @@ -0,0 +1,39 @@ +import styled from "@emotion/styled"; + +export const IndexContainer = styled.div` + background-color: #fff; + display: flex; + justify-content: center; + align-content: center; + margin-top: 3 00px; +`; + +export const InnerContainer = styled.div` + margin-top: 50px; + width: 1626px; + height: 701px; + flex-shrink: 0; + display: flex; + flex-direction: column; + border-radius: 30px; + justify-content: center; +`; +export const SignButton = styled.div` + width: 636px; + height: 77px; + flex-shrink: 0; + border-radius: 59px; + background: #3a6e67; + color: #fff; + text-align: center; + font-feature-settings: "clig" off, "liga" off; + font-family: Inter; + font-size: 24px; + font-style: normal; + font-weight: 400; + line-height: 20px; + display: flex; + justify-content: center; + align-items: center; + margin-top: 30px; +`; diff --git a/src/component/project/community/index.js b/src/component/project/community/index.js new file mode 100644 index 0000000..0bd789a --- /dev/null +++ b/src/component/project/community/index.js @@ -0,0 +1,130 @@ +import React, { useState } from "react"; +import styled from "@emotion/styled"; +import { + Container, + Title, + ButtonContainer, + Button, +} from "../../emotion/component"; +const Community = () => { + const OuterContainer = styled.div` + display: flex; + align-items: center; + justify-content: space-between; + flex-direction: row; + `; + + const TableContainer = styled.div` + margin-top: 40px; + padding: 0 147px; + table { + width: 100%; + border-collapse: collapse; + th { + border: 1px solid #fff; + color: #fff; + padding: 10px; + background: #76c56f; + } + td { + border: 1px solid #dfdfdf; + padding: 10px; + } + th:nth-of-type(1) { + width: 1361px; + } + th:nth-of-type(2) { + width: 265px; + } + td { + height: 60px; + } + input { + width: 100%; + height: 100%; + border: none; + background: transparent; + color: #000; + font-family: Inter; + font-size: 14px; + } + } + `; + + const [data, setData] = useState([ + { id: 1, title: "Sample Title 1", author: "John" }, + { id: 2, title: "Sample Title 2", author: "Jane" }, + { id: 3, title: "Sample Title 3", author: "Mike" }, + { id: 4, title: "Sample Title 4", author: "Emily" }, + { id: 5, title: "Sample Title 5", author: "Alice" }, + { id: 6, title: "", author: "" }, + { id: 7, title: "", author: "" }, + { id: 8, title: "", author: "" }, + { id: 9, title: "", author: "" }, + { id: 10, title: "", author: "" }, + ]); + + const handleTitleChange = (index, value) => { + setData((prevData) => + prevData.map((item, i) => + index === i ? { ...item, title: value } : item + ) + ); + }; + + const handleAuthorChange = (index, value) => { + setData((prevData) => + prevData.map((item, i) => + index === i ? { ...item, author: value } : item + ) + ); + }; + + return ( + <> + + + 커뮤니티 + + 글쓰기 + 내가쓴글 + + + + + + + 제목 + 글쓴이 + + + + {data.map((item, index) => ( + + + handleTitleChange(index, e.target.value)} + /> + + + + handleAuthorChange(index, e.target.value) + } + /> + + + ))} + + + + + > + ); +}; + +export default Community; diff --git a/src/component/project/community/main.js b/src/component/project/community/main.js deleted file mode 100644 index 1d918f8..0000000 --- a/src/component/project/community/main.js +++ /dev/null @@ -1,10 +0,0 @@ -import React from "react"; - -const Main = () => { - return ( - <> - 메인페이지 - > - ); -}; -export default Main;