diff --git a/src/Community.tsx b/src/Community.tsx index 666805f..6fae3dc 100644 --- a/src/Community.tsx +++ b/src/Community.tsx @@ -5,7 +5,7 @@ import { BiDotsVerticalRounded } from "react-icons/bi"; import { AiOutlineEnter } from "react-icons/ai"; import { CgHeart } from "react-icons/cg"; import { BiSubdirectoryRight } from "react-icons/bi"; - +import { FaHeart } from "react-icons/fa6"; const CommunityComponent = styled.div` width: 100%; display: flex; @@ -40,13 +40,22 @@ const Communityinput = styled.input` height: 70px; width: 70%; `; +const Replyinput = styled.input` +margin-left:200px; + height: 50px; + width: 50%; +`; const CommunityButton = styled.button` border-radius: 25px; height: 70px; width: 30%; `; - +const ReplyButton = styled.button` + border-radius: 25px; + height: 50px; + width: 15%; +`; const CommunityMid = styled.div` display: flex; width: 46%; @@ -94,7 +103,11 @@ const Answertop = styled.div` align-items: center; `; -const Answersetting = styled.div``; +const Answersetting = styled.div` + +display:flex;`; + + const Answername = styled.div``; const Answercomponent = styled.div``; const Cmanswer = styled.div` @@ -113,39 +126,49 @@ const Ca = styled.div` function Community() { const [inputText, setInputText] = useState(""); - const [inputText2, setInputText2] = useState(""); const [Community, setCommunity] = useState([]); - const [isChange, setIsChange] = useState(false); - const [is, setIs] = useState(false); + + const [heart, setHeart] = useState(false); + const [ReplyText, setReplyText] = useState(""); + const [Reply, setReply] = useState([]); + const [Change, setChange] = useState(false); + + const handleChange = (e: React.ChangeEvent) => { setInputText(e.target.value); }; - const handleChange2 = (e: React.ChangeEvent) => { - setInputText2(e.target.value); - }; const handleClick = () => { setCommunity([...Community, inputText]); setInputText(""); }; + + const heartClick = () => { + setHeart((prevChange) => !prevChange); + }; + + + const ReplyChange = (e: React.ChangeEvent) => { + setReplyText(e.target.value); + }; const handleReplyClick = () => { alert("대댓글을 작성하시겠습니까?"); - setIsChange((prevIsChange) => !prevIsChange); + setChange((prevChange) => !prevChange); }; - - const ChangeClick = () => { - setCommunity([...Community, inputText]); - setInputText(""); - setIsChange((prevIsChange) => !prevIsChange); - setIs(true); + const ReplyClick = () => { + setReply([...Reply, ReplyText]); + setReplyText(""); + setChange((prevChange) => !prevChange); + }; return ( + 제목 뭐시기 @@ -160,46 +183,46 @@ function Community() { - {Community.map((text:any, index:any) => ( + {Community.map((text:string, index:number) => ( 이름 - - // + +
{heart?():()}
/
/
{text}
))} - {is&&( - Community.map((inputText2:any, index:any) => ( - - + + {Reply.map((Text2:string, index:number) => ( + + 이름 - // +
{heart?():()}
/
- {inputText2} + {Text2}
- )) -)} - - - {isChange&& ( - <> - - - -)} + ))} + + + + {Change&& ( + <> + + 대댓글 쓰기 + + )} @@ -211,12 +234,13 @@ function Community() { 답장하기 - - +
); } export default Community; + + diff --git a/src/Make.tsx b/src/Make.tsx index e52c079..0e50014 100644 --- a/src/Make.tsx +++ b/src/Make.tsx @@ -27,6 +27,7 @@ flex-direction:column; `; const MakeLeftNumber=styled.div` background-Color:gray; +font-size:100px; width:500px; height:500px; border-radius:50%; @@ -54,28 +55,39 @@ display:flex; `; const MakeRight=styled.div` -width:50%; +margin-top:100px; display:flex; align-items:center; -justify-content:center; -height:80%; +height:660px; flex-direction:column; `; const MakeRightTitle=styled.div` background-color:gray; -width:700px; -height:50px; +width:600px; +max-height:50px; border-radius:25px; display:flex; align-items:center; justify-content:center; `; -const MakeRightFriend =styled.div` + +const MakeRightfriend=styled.div` +display:flex; +`; +const MakeRightinput =styled.input` height:70px; +width:600px; display:flex; align-items:center; `; - +const MakeRightbutton =styled.button` +display:flex; +align-items:center; +`; +const MakeRightCenter=styled.div` +height:550px; +overflow-y: auto; +`; const MakeBottom=styled.div` width:100%; height:15%; @@ -99,43 +111,56 @@ interface MainProps { const Make: React.FC = ({ isSidebarOpen }) =>{ const [pL, setPL] = useState(0); +const[number,setNumber]=useState(0); +const Click = () => { + alert("선택 완료"); + + }; useEffect(() => { const Left = isSidebarOpen ? 200 : 0; setPL(Left); }, [isSidebarOpen]); + + + const plus=()=>{ + setNumber(number+1); + } + const minus=()=>{ + setNumber(number-1); + } return ( <> - 1 + {number} - - 1 - + + {number} + + + 같이 공부 할 친구를 입력하세요! - - 아이디를 입력하세요 - - - asdsdasas - - - asdsdasas - - - asdsdasas - + +{Array.from({ length: number }).map((_, index) => ( + + +확인 + + ))} + + + diff --git a/src/MyPage.tsx b/src/MyPage.tsx index 0e95217..e349fbc 100644 --- a/src/MyPage.tsx +++ b/src/MyPage.tsx @@ -43,7 +43,7 @@ background-color: aliceblue;`; - const MPTbutton= styled.button` + const MPTbutton= styled.button` border-radius: 25px; border: none; height: 30px; @@ -62,10 +62,6 @@ background-color: aliceblue;`; padding-right: 25px; border-radius: 25px; `; - - - - const MyPageBottom = styled.div` box-sizing: border-box; @@ -94,9 +90,31 @@ const MPBfriendContentButton = styled.button` background-color: red; border: none; `; +const MPBfriendPage=styled.button` + height: 40px; + width: 90px; + border-radius: 15px; + border: none; +`; +const MPBfriend=styled.div` +overflow-y:auto; +`; const MyPage = () => { + + const friend = [ + "테스트하는 인간", + "늙은 사람", + "강서쪽 사람", + ]; + +const friendDelete=()=>{ +alert("삭제되었습니다."); + +} + + return ( @@ -104,27 +122,25 @@ const MyPage = () => {
이름 -
#뭐시기
+
#강서 #프론트엔드 #웹 개발
내 정보 수정 내가 쓴 글 목록 -
+
내 친구들
- -
친구 이름
- 친구 삭제 + {[...Array(3)].map((_, index) => ( + +
{friend[index]}
+
+ 친구 페이지 + 친구 삭제 +
- -
친구 이름
- 친구 삭제 -
- -
친구 이름
- 친구 삭제 -
-
+))} + +