From b08a2f92c2e597529f408cbd7032c056164c3124 Mon Sep 17 00:00:00 2001 From: CBWDG Date: Mon, 20 Nov 2023 17:41:58 +0900 Subject: [PATCH 1/7] =?UTF-8?q?feat(#91):=20=EB=8D=94=EB=AF=B8=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/chat-dummy/ChatFriendsDummy.ts | 44 ------------------- src/apis/chat-dummy/ChattingDummy.ts | 15 +++++++ src/apis/chat-dummy/friendsDummy.ts | 42 ------------------ .../molecules/chat-list/ChatDMFriendList.tsx | 2 +- src/components/molecules/chat-list/styles.ts | 2 +- .../organisms/chats/chat-space/ChatSpace.tsx | 4 +- 6 files changed, 18 insertions(+), 91 deletions(-) delete mode 100644 src/apis/chat-dummy/ChatFriendsDummy.ts create mode 100644 src/apis/chat-dummy/ChattingDummy.ts delete mode 100644 src/apis/chat-dummy/friendsDummy.ts diff --git a/src/apis/chat-dummy/ChatFriendsDummy.ts b/src/apis/chat-dummy/ChatFriendsDummy.ts deleted file mode 100644 index 7abfe9a..0000000 --- a/src/apis/chat-dummy/ChatFriendsDummy.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { FriendsDummy } from './friendsDummy'; - -// 채팅 대화 데이터 형식 정의 -interface ChatMessage { - textMessage: string; - createdAt: string; -} - -interface ChatRoom { - roomId: { - id: number; - userId: number; - userName: string; - messages: ChatMessage[]; - }; -} - -// 더미 채팅 대화 데이터를 저장할 배열 -const ChatRoomDummy: ChatRoom[] = []; - -// FriendsDummy에서 정보 추출 및 채팅방 생성 -FriendsDummy.forEach((friend) => { - const { id, name, roomId } = friend; - const chatRoom: ChatRoom = { - roomId: { - id: roomId, - userId: id, - userName: name, - messages: [ - { - textMessage: `안녕 내이름은 ${name}입니다!`, - createdAt: '2023-11-01T12:00:00', - }, - { - textMessage: '어떤 과에 재학중이신가요?', - createdAt: '2023-11-01T12:05:00', - }, - ], - }, - }; - ChatRoomDummy.push(chatRoom); -}); - -export { ChatRoomDummy }; diff --git a/src/apis/chat-dummy/ChattingDummy.ts b/src/apis/chat-dummy/ChattingDummy.ts new file mode 100644 index 0000000..4649fa9 --- /dev/null +++ b/src/apis/chat-dummy/ChattingDummy.ts @@ -0,0 +1,15 @@ +interface ChatMessage { + chatId: string; + textMessage: string; + createdAt: string; + sender: { + id: string; + name: string; + profileImage: string; + }; +} +interface ChatMessageList { + roomId: string; + contents: ChatMessage[]; + hasNext: boolean; +} diff --git a/src/apis/chat-dummy/friendsDummy.ts b/src/apis/chat-dummy/friendsDummy.ts deleted file mode 100644 index 378dd77..0000000 --- a/src/apis/chat-dummy/friendsDummy.ts +++ /dev/null @@ -1,42 +0,0 @@ -export const FriendsDummy = [ - { - id: 1, - name: '원동건', - roomId: 1, - }, - { - id: 2, - name: '이재진', - roomId: 2, - }, - { - id: 3, - name: '정비호', - roomId: 3, - }, - { - id: 4, - name: '박준혁', - roomId: 4, - }, - { - id: 5, - name: '이승우', - roomId: 5, - }, - { - id: 6, - name: '김정우', - roomId: 6, - }, - { - id: 7, - name: '정재균', - roomId: 7, - }, - { - id: 8, - name: '박현우', - roomId: 8, - }, -]; diff --git a/src/components/molecules/chat-list/ChatDMFriendList.tsx b/src/components/molecules/chat-list/ChatDMFriendList.tsx index 7745986..609d927 100644 --- a/src/components/molecules/chat-list/ChatDMFriendList.tsx +++ b/src/components/molecules/chat-list/ChatDMFriendList.tsx @@ -8,7 +8,7 @@ import { friendInfoState } from '@/recoil/atoms/FriendsAtom'; interface DMFriendListProps {} const DMFriendList = ({}: DMFriendListProps) => { - const [friendListCollapse, setFriendListCollapse] = useState(false); + const [friendListCollapse, setFriendListCollapse] = useState(false); const friendsData = useRecoilValue(friendInfoState); const router = useRouter(); const collapsibleRef = useRef(null); diff --git a/src/components/molecules/chat-list/styles.ts b/src/components/molecules/chat-list/styles.ts index 4d075af..9619a41 100644 --- a/src/components/molecules/chat-list/styles.ts +++ b/src/components/molecules/chat-list/styles.ts @@ -1,7 +1,7 @@ import styled from 'styled-components'; interface ButtonContainerProps { - collapse: boolean; + collapse: Boolean; onClick: () => void; } diff --git a/src/components/organisms/chats/chat-space/ChatSpace.tsx b/src/components/organisms/chats/chat-space/ChatSpace.tsx index e995a70..90cdd90 100644 --- a/src/components/organisms/chats/chat-space/ChatSpace.tsx +++ b/src/components/organisms/chats/chat-space/ChatSpace.tsx @@ -1,10 +1,8 @@ -import React, { useEffect } from 'react'; +import React from 'react'; import * as S from './styled'; import DMFriendList from '../../../molecules/chat-list/ChatDMFriendList'; import DMList from '../../../molecules/chat-list/ChatDMList'; import Chatting from '../chatting/Chatting'; -// import ChattingRoom from '../chat-room/ChatRoom'; -// import DMList from '../chat-dm/ChatDMList'; const ChatSpace = (): JSX.Element => { return ( From c35019c5b9ba47733d84c24c90cfbfc95b4a5526 Mon Sep 17 00:00:00 2001 From: CBWDG Date: Tue, 21 Nov 2023 16:17:16 +0900 Subject: [PATCH 2/7] =?UTF-8?q?feat(#91):=20=EC=A3=BC=EC=84=9D=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/organisms/common/floatingbar/FloatingBar.tsx | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/components/organisms/common/floatingbar/FloatingBar.tsx b/src/components/organisms/common/floatingbar/FloatingBar.tsx index b479a01..fe13452 100644 --- a/src/components/organisms/common/floatingbar/FloatingBar.tsx +++ b/src/components/organisms/common/floatingbar/FloatingBar.tsx @@ -87,9 +87,6 @@ const FloatingBar = () => { - {/*
- -
*/}
From 6ebbec619ac005158c222a168851a1a90f71c955 Mon Sep 17 00:00:00 2001 From: CBWDG Date: Tue, 21 Nov 2023 16:33:59 +0900 Subject: [PATCH 3/7] feat(#96): firstCommit --- src/components/organisms/common/floatingbar/FloatingBar.tsx | 2 -- src/components/organisms/friend-list/ListFriend.tsx | 4 ---- 2 files changed, 6 deletions(-) diff --git a/src/components/organisms/common/floatingbar/FloatingBar.tsx b/src/components/organisms/common/floatingbar/FloatingBar.tsx index fe13452..10cf94a 100644 --- a/src/components/organisms/common/floatingbar/FloatingBar.tsx +++ b/src/components/organisms/common/floatingbar/FloatingBar.tsx @@ -90,12 +90,10 @@ const FloatingBar = () => {
- {isOpenModal && } - diff --git a/src/components/organisms/friend-list/ListFriend.tsx b/src/components/organisms/friend-list/ListFriend.tsx index af6739d..a48416c 100644 --- a/src/components/organisms/friend-list/ListFriend.tsx +++ b/src/components/organisms/friend-list/ListFriend.tsx @@ -39,9 +39,7 @@ const ListFriend = () => { loginUserId, item.requesterId, ); - let friendInfo = {}; - if (loginUserId === item.requesterId) { friendInfo = { requesterId: item[`${requester}Id`], @@ -55,10 +53,8 @@ const ListFriend = () => { respondentImage: item[respondent]?.userImage?.imageUrl || '', }; } - return friendInfo; }); - setFriendInfo(updatedFriendInfoList); } catch (error) { console.error('친구 목록을 가져오는 중 오류 발생:', error); From 4bbbb4066bc86996d52809f4b70d3d6e4bed9d8d Mon Sep 17 00:00:00 2001 From: CBWDG Date: Tue, 21 Nov 2023 17:09:37 +0900 Subject: [PATCH 4/7] feat(#96): fixFriendList --- .../organisms/friend-list/ListFriend.tsx | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/components/organisms/friend-list/ListFriend.tsx b/src/components/organisms/friend-list/ListFriend.tsx index a48416c..6ddfd6f 100644 --- a/src/components/organisms/friend-list/ListFriend.tsx +++ b/src/components/organisms/friend-list/ListFriend.tsx @@ -39,22 +39,27 @@ const ListFriend = () => { loginUserId, item.requesterId, ); + let friendInfo = {}; + if (loginUserId === item.requesterId) { friendInfo = { - requesterId: item[`${requester}Id`], - requesterName: item[requester]?.name || '', - requesterImage: item[requester]?.userImage?.imageUrl || '', + requesterId: item[`${respondent}Id`], + requesterName: item[respondent]?.name || '', + requesterImage: item[respondent]?.userImage?.imageUrl || '', }; } else { friendInfo = { - respondentId: item[`${respondent}Id`], - respondentName: item[respondent]?.name || '', - respondentImage: item[respondent]?.userImage?.imageUrl || '', + respondentId: item[`${requester}Id`], + respondentName: item[requester]?.name || '', + respondentImage: item[requester]?.userImage?.imageUrl || '', }; } + + console.log(friendInfo); return friendInfo; }); + setFriendInfo(updatedFriendInfoList); } catch (error) { console.error('친구 목록을 가져오는 중 오류 발생:', error); @@ -74,7 +79,7 @@ const ListFriend = () => { const isConfirmed = window.confirm( `${ - friendToDelete?.respondentId === deletedId + friendToDelete?.requesterId === deletedId ? friendToDelete?.respondentName : friendToDelete?.requesterName }님을 친구에서 삭제하시겠습니까?`, From f7da471cec1643234dbcab7a15966a1fc69954be Mon Sep 17 00:00:00 2001 From: CBWDG Date: Wed, 22 Nov 2023 13:45:22 +0900 Subject: [PATCH 5/7] =?UTF-8?q?feat(#96):=20view=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/user.ts | 2 +- .../molecules/add-friend/AddFriend.tsx | 4 ++-- .../molecules/chat-icon/ChatIcon.tsx | 24 +++++++++++++++++++ .../post-comment/PostCreateReComment.tsx | 2 +- .../common/floatingbar/FloatingBar.tsx | 2 +- .../post-unit/PostCreateComments.tsx | 2 +- .../templates/chat-temp/ChatPageTemplate.tsx | 11 +++++++++ .../templates/post-temp/PostTemplates.tsx | 6 ++++- src/components/veiws/AllPost.tsx | 17 ------------- src/components/veiws/FreePost.tsx | 12 ---------- src/components/veiws/IndividualPage.tsx | 13 ---------- src/components/veiws/MarketPost.tsx | 12 ---------- src/components/veiws/MeetingPost.tsx | 12 ---------- src/components/veiws/MenmenPost.tsx | 12 ---------- src/components/veiws/UnitPost.tsx | 19 --------------- src/pages/chat/[id].tsx | 12 ++++++++++ src/pages/free/index.tsx | 2 -- src/pages/market/index.tsx | 2 -- src/pages/meeting/index.tsx | 2 -- src/pages/menmen/index.tsx | 3 --- src/pages/mypage/[id].tsx | 5 ++-- src/pages/post/unit/[id].tsx | 14 +++++++---- src/recoil/atoms/MyProfile.ts | 15 ++++++++++++ 23 files changed, 85 insertions(+), 120 deletions(-) create mode 100644 src/components/molecules/chat-icon/ChatIcon.tsx create mode 100644 src/components/templates/chat-temp/ChatPageTemplate.tsx delete mode 100644 src/components/veiws/AllPost.tsx delete mode 100644 src/components/veiws/FreePost.tsx delete mode 100644 src/components/veiws/IndividualPage.tsx delete mode 100644 src/components/veiws/MarketPost.tsx delete mode 100644 src/components/veiws/MeetingPost.tsx delete mode 100644 src/components/veiws/MenmenPost.tsx delete mode 100644 src/components/veiws/UnitPost.tsx create mode 100644 src/pages/chat/[id].tsx create mode 100644 src/recoil/atoms/MyProfile.ts diff --git a/src/apis/user.ts b/src/apis/user.ts index df6e43e..8e311b9 100644 --- a/src/apis/user.ts +++ b/src/apis/user.ts @@ -15,7 +15,7 @@ const USERS = { path: '/user', //유저정보조회api - async getUserProfile(): Promise { + async getMyProfile(): Promise { try { const result: AxiosResponse = await instance.get(`${USERS.path}/my-info`); return result.data; diff --git a/src/components/molecules/add-friend/AddFriend.tsx b/src/components/molecules/add-friend/AddFriend.tsx index a221523..bc7aa8d 100644 --- a/src/components/molecules/add-friend/AddFriend.tsx +++ b/src/components/molecules/add-friend/AddFriend.tsx @@ -15,7 +15,7 @@ const AddFriend = (props: User) => { const router = useRouter(); const handleMypage = async () => { try { - const userInfo = await USERS.getUserProfile(); + const userInfo = await USERS.getMyProfile(); const id = userInfo.userId; router.push(`/mypage/${id}`); } catch (error) { @@ -24,7 +24,7 @@ const AddFriend = (props: User) => { }; const handleAddFriend = async () => { try { - const userInfo = await USERS.getUserProfile(); + const userInfo = await USERS.getMyProfile(); const currentUserId = userInfo.userId; const friendId = props.id; if (currentUserId === friendId) { diff --git a/src/components/molecules/chat-icon/ChatIcon.tsx b/src/components/molecules/chat-icon/ChatIcon.tsx new file mode 100644 index 0000000..7cd293c --- /dev/null +++ b/src/components/molecules/chat-icon/ChatIcon.tsx @@ -0,0 +1,24 @@ +import React, { useEffect, useState } from 'react'; +import { useRouter } from 'next/router'; +import { useRecoilState, useRecoilValue } from 'recoil'; +import USERS, { UserInfo } from '@/apis/user'; +import { MyProfileAtom } from '@/recoil/atoms/MyProfile'; + +export const ChatIcon = () => { + const [myProfile, setMyprofile] = useRecoilState(MyProfileAtom); + const getMyProfile = async () => { + const myInfo = await USERS.getMyProfile(); + setMyprofile(myInfo); + }; + useEffect(() => { + getMyProfile(); + }); + + const handleChatPage = () => { + const myId = useRecoilValue(MyProfileAtom); + }; + + return <>; +}; + +export default ChatIcon; diff --git a/src/components/molecules/post-comment/PostCreateReComment.tsx b/src/components/molecules/post-comment/PostCreateReComment.tsx index f227e37..7c8d0e8 100644 --- a/src/components/molecules/post-comment/PostCreateReComment.tsx +++ b/src/components/molecules/post-comment/PostCreateReComment.tsx @@ -61,7 +61,7 @@ const PostCreateReComment = ({ commentId }: PostCreateRCommentProps) => { //본인 정보 받아오는 api 호출 const getUserInfo = async () => { - const response = await USERS.getUserProfile(); + const response = await USERS.getMyProfile(); setUserInfo((prev) => { return { ...prev, diff --git a/src/components/organisms/common/floatingbar/FloatingBar.tsx b/src/components/organisms/common/floatingbar/FloatingBar.tsx index 10cf94a..46db394 100644 --- a/src/components/organisms/common/floatingbar/FloatingBar.tsx +++ b/src/components/organisms/common/floatingbar/FloatingBar.tsx @@ -35,7 +35,7 @@ const FloatingBar = () => { const handleGetMyId = async () => { try { - const response = await USERS.getUserProfile(); + const response = await USERS.getMyProfile(); console.log(response); setMyInfo(response.userId); } catch (error: any) { diff --git a/src/components/organisms/post-unit/PostCreateComments.tsx b/src/components/organisms/post-unit/PostCreateComments.tsx index 35f9181..f497fc3 100644 --- a/src/components/organisms/post-unit/PostCreateComments.tsx +++ b/src/components/organisms/post-unit/PostCreateComments.tsx @@ -64,7 +64,7 @@ const PostCreateComment = (props: BoardId) => { //본인 정보 받아오는 api 호출 const getUserInfo = async () => { - const response = await USERS.getUserProfile(); + const response = await USERS.getMyProfile(); setUserInfo((prev) => { return { ...prev, diff --git a/src/components/templates/chat-temp/ChatPageTemplate.tsx b/src/components/templates/chat-temp/ChatPageTemplate.tsx new file mode 100644 index 0000000..8ff2394 --- /dev/null +++ b/src/components/templates/chat-temp/ChatPageTemplate.tsx @@ -0,0 +1,11 @@ +import React from 'react'; + +export interface Me { + id: number; +} + +const ChatPageTemplate = () => { + return <>; +}; + +export default ChatPageTemplate; diff --git a/src/components/templates/post-temp/PostTemplates.tsx b/src/components/templates/post-temp/PostTemplates.tsx index 4057431..5440894 100644 --- a/src/components/templates/post-temp/PostTemplates.tsx +++ b/src/components/templates/post-temp/PostTemplates.tsx @@ -2,7 +2,6 @@ import PostBoardHeader from '../../organisms/post-board/PostBoardHearder'; import * as S from './styled'; import PostBoards from '@/components/organisms/post-board/PostBoards'; import { ContextType, Suspense, useEffect, useState } from 'react'; -import { Board } from '@/components/veiws/AllPost'; import { useRouter } from 'next/router'; import PostSearchBoard from '@/components/organisms/post-board/PostSearchBoard'; import { ParsedUrlQuery } from 'querystring'; @@ -10,6 +9,11 @@ import { IncomingMessage, ServerResponse } from 'http'; import SEARCH from '@/apis/search'; import { GetServerSideProps, NextPage } from 'next'; +export interface Board { + main?: string; + totalPage?: number; +} + const PostBoardTemplates = (props: Board): JSX.Element => { const router = useRouter(); const [queryValue, setQueryValue] = useState(''); diff --git a/src/components/veiws/AllPost.tsx b/src/components/veiws/AllPost.tsx deleted file mode 100644 index 371fee0..0000000 --- a/src/components/veiws/AllPost.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import PostBoardTemplates from '../templates/post-temp/PostTemplates'; - -export interface Board { - main?: string; - totalPage?: number; -} - -const AllPost = () => { - return ( -
- {/* 전체 게시판 */} - -
- ); -}; - -export default AllPost; diff --git a/src/components/veiws/FreePost.tsx b/src/components/veiws/FreePost.tsx deleted file mode 100644 index 81a1107..0000000 --- a/src/components/veiws/FreePost.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import PostBoardTemplates from '../templates/post-temp/PostTemplates'; - -const FreePost = () => { - return ( -
- {/*자유게시판*/} - -
- ); -}; - -export default FreePost; diff --git a/src/components/veiws/IndividualPage.tsx b/src/components/veiws/IndividualPage.tsx deleted file mode 100644 index 35dec59..0000000 --- a/src/components/veiws/IndividualPage.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import React from 'react'; -import RelationLists from '../templates/relation-list/RelatioinLists'; -import { RequestFriend } from '@/apis/friend-api/friendRequest'; - -const IndividualPage = () => { - return ( -
- -
- ); -}; - -export default IndividualPage; diff --git a/src/components/veiws/MarketPost.tsx b/src/components/veiws/MarketPost.tsx deleted file mode 100644 index 1a0aa74..0000000 --- a/src/components/veiws/MarketPost.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import PostBoardTemplates from '../templates/post-temp/PostTemplates'; - -const MarketPost = () => { - return ( -
- {/*장터게시판*/} - -
- ); -}; - -export default MarketPost; diff --git a/src/components/veiws/MeetingPost.tsx b/src/components/veiws/MeetingPost.tsx deleted file mode 100644 index 6c3e3a8..0000000 --- a/src/components/veiws/MeetingPost.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import PostBoardTemplates from '../templates/post-temp/PostTemplates'; - -const MeetingPost = () => { - return ( -
- {/*만남게시판*/} - -
- ); -}; - -export default MeetingPost; diff --git a/src/components/veiws/MenmenPost.tsx b/src/components/veiws/MenmenPost.tsx deleted file mode 100644 index e5c7026..0000000 --- a/src/components/veiws/MenmenPost.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import PostBoardTemplates from '../templates/post-temp/PostTemplates'; - -const MenmenPost = () => { - return ( -
- {/*멘토멘티게시판*/} - -
- ); -}; - -export default MenmenPost; diff --git a/src/components/veiws/UnitPost.tsx b/src/components/veiws/UnitPost.tsx deleted file mode 100644 index 32845c7..0000000 --- a/src/components/veiws/UnitPost.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import React from 'react'; -import { useRouter } from 'next/router'; -import PostUnitTemplate from '../templates/post-unit-temp/PostUnitTemplate'; - -const UnitPost = () => { - const router = useRouter(); - - return ( -
- loading}> - {router.isReady && ( - - )} - -
- ); -}; - -export default UnitPost; diff --git a/src/pages/chat/[id].tsx b/src/pages/chat/[id].tsx new file mode 100644 index 0000000..d8a43f4 --- /dev/null +++ b/src/pages/chat/[id].tsx @@ -0,0 +1,12 @@ +import ChatPageTemplate from '@/components/templates/chat-temp/ChatPageTemplate'; +import React from 'react'; + +const ChatPage = () => { + return ( + <> + ; + + ); +}; + +export default ChatPage; diff --git a/src/pages/free/index.tsx b/src/pages/free/index.tsx index eea783f..53e2a63 100644 --- a/src/pages/free/index.tsx +++ b/src/pages/free/index.tsx @@ -1,4 +1,3 @@ -import FreePost from '@/components/veiws/FreePost'; import { TotalPageProps } from '..'; import { GetServerSideProps, NextPage } from 'next'; import SEARCH from '@/apis/search'; @@ -8,7 +7,6 @@ const FreeBoardPage: NextPage = ({ total }) => { return (
- {/* */}
); }; diff --git a/src/pages/market/index.tsx b/src/pages/market/index.tsx index 404e82c..85166ff 100644 --- a/src/pages/market/index.tsx +++ b/src/pages/market/index.tsx @@ -1,4 +1,3 @@ -import MarketPost from '@/components/veiws/MarketPost'; import SEARCH from '@/apis/search'; import PostBoardTemplates from '@/components/templates/post-temp/PostTemplates'; import { GetServerSideProps, NextPage } from 'next'; @@ -8,7 +7,6 @@ const MarketBoardPage: NextPage = ({ total }) => { return (
- {/* */}
); }; diff --git a/src/pages/meeting/index.tsx b/src/pages/meeting/index.tsx index 1abf381..2f6d602 100644 --- a/src/pages/meeting/index.tsx +++ b/src/pages/meeting/index.tsx @@ -1,4 +1,3 @@ -import MeetingPost from '@/components/veiws/MeetingPost'; import SEARCH from '@/apis/search'; import PostBoardTemplates from '@/components/templates/post-temp/PostTemplates'; import { GetServerSideProps, NextPage } from 'next'; @@ -8,7 +7,6 @@ const MeetingBoardPage: NextPage = ({ total }) => { return (
- {/* */}
); }; diff --git a/src/pages/menmen/index.tsx b/src/pages/menmen/index.tsx index 6a4d395..5843840 100644 --- a/src/pages/menmen/index.tsx +++ b/src/pages/menmen/index.tsx @@ -1,5 +1,3 @@ -import MenmenPost from '@/components/veiws/MenmenPost'; - import { TotalPageProps } from '..'; import { GetServerSideProps, NextPage } from 'next'; import SEARCH from '@/apis/search'; @@ -9,7 +7,6 @@ const MenmenBoardPage: NextPage = ({ total }) => { return (
- {/* */}
); }; diff --git a/src/pages/mypage/[id].tsx b/src/pages/mypage/[id].tsx index a5d77b5..01c8f70 100644 --- a/src/pages/mypage/[id].tsx +++ b/src/pages/mypage/[id].tsx @@ -1,11 +1,10 @@ +import RelationLists from '@/components/templates/relation-list/RelatioinLists'; import React from 'react'; -// import { useRouter } from 'next/router'; -import IndividualPage from '@/components/veiws/IndividualPage'; const UserPage = () => { return ( <> - + ); }; diff --git a/src/pages/post/unit/[id].tsx b/src/pages/post/unit/[id].tsx index c589f68..7a25705 100644 --- a/src/pages/post/unit/[id].tsx +++ b/src/pages/post/unit/[id].tsx @@ -1,11 +1,17 @@ import PostUnitTemplate from '@/components/templates/post-unit-temp/PostUnitTemplate'; -import UnitPost from '@/components/veiws/UnitPost'; +import { useRouter } from 'next/router'; +import React from 'react'; const PostTitle = () => { + const router = useRouter(); return ( - <> - - +
+ loading}> + {router.isReady && ( + + )} + +
); }; diff --git a/src/recoil/atoms/MyProfile.ts b/src/recoil/atoms/MyProfile.ts new file mode 100644 index 0000000..583bfd2 --- /dev/null +++ b/src/recoil/atoms/MyProfile.ts @@ -0,0 +1,15 @@ +import { UserInfo } from '@/apis/user'; +import { atom } from 'recoil'; + +export const MyProfileAtom = atom({ + key: 'MyProfile', + default: { + userId: 0, + name: '', + email: '', + gender: '', + admin: '', + provider: '', + userImage: '', + }, +}); From 0fe26ae8eaf951322d85c20afa09c8789741cf5f Mon Sep 17 00:00:00 2001 From: CBWDG Date: Wed, 22 Nov 2023 13:49:49 +0900 Subject: [PATCH 6/7] feat(#96): fix --- src/components/organisms/post-board/PostBoards.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/organisms/post-board/PostBoards.tsx b/src/components/organisms/post-board/PostBoards.tsx index f30906b..651f8a4 100644 --- a/src/components/organisms/post-board/PostBoards.tsx +++ b/src/components/organisms/post-board/PostBoards.tsx @@ -1,8 +1,8 @@ import { useEffect, useState, useRef, useCallback } from 'react'; import UnitBox from '@/components/molecules/post-board/UnitBox'; import BOARDS from '@/apis/boards'; -import { Board } from '@/components/veiws/AllPost'; import * as S from './styled'; +import { Board } from '@/components/templates/post-temp/PostTemplates'; const PostBoards = (props: Board): JSX.Element => { const [getList, setGetList] = useState([]); From 956120d905c9806b48665a5ee181f0ee07bc2aa0 Mon Sep 17 00:00:00 2001 From: CBWDG Date: Wed, 22 Nov 2023 13:53:25 +0900 Subject: [PATCH 7/7] feat(#96): fix2 --- src/pages/index.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 056e600..f877b96 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -1,6 +1,5 @@ import SEARCH from '@/apis/search'; import PostBoardTemplates from '@/components/templates/post-temp/PostTemplates'; -import AllPost from '@/components/veiws/AllPost'; import { GetServerSideProps, NextPage } from 'next'; export interface TotalPageProps { @@ -11,7 +10,6 @@ const Home: NextPage = ({ total }) => { return ( <> - {/* */} ); };