Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4주차] 이현영 미션 제출합니다. #19

Open
wants to merge 36 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
fd3af98
style: 기본 마크업
hamo-o Sep 29, 2022
489440a
refactor: Header 컴포넌트 분리
hamo-o Sep 29, 2022
73388d2
feat: handleSubmit() 추가 && refactor: InputBox 컴포넌트 분리
hamo-o Sep 30, 2022
9142feb
refactor: ChatBoxList 컴포넌트 분리
hamo-o Sep 30, 2022
47fd40f
feat: useContext로 chats 배열 공급
hamo-o Sep 30, 2022
bc5bbe1
fix: 배열 prop으로 내려주기
hamo-o Sep 30, 2022
be858ce
fix: ChatBox 컴포넌트에 prop 전달
hamo-o Sep 30, 2022
0e3f9e2
fix: User배열 위치 변경
hamo-o Sep 30, 2022
051acf7
feat: enterKey, shiftKey 처리
hamo-o Sep 30, 2022
bfb4d50
fix: setChats user_id값 수정 && ChatBoxList 렌더링 내용 수정
hamo-o Sep 30, 2022
3d37248
feat: scrollTo() 구현
hamo-o Sep 30, 2022
bbb1deb
fix: json 파일 변경 && design: ChatBox css 수정
hamo-o Oct 1, 2022
4a7d4a0
fix: anytype 수정
hamo-o Oct 2, 2022
7036d54
refactor: interface 분리
hamo-o Oct 4, 2022
ba84517
refactor: React.FC 대체 && chore: 사용하지 않는 hook 정리
hamo-o Oct 5, 2022
e00d00b
feat: json 파일 추가
hamo-o Nov 2, 2022
c9b60b7
refactor: context > recoil 사용
hamo-o Nov 2, 2022
3de2c14
feat: page routing
hamo-o Nov 2, 2022
9bd10a9
feat: Header 추가
hamo-o Nov 3, 2022
c110bee
feat: 친구 목록 페이지 구현
hamo-o Nov 3, 2022
4f14b31
feat: navbar 구현
hamo-o Nov 3, 2022
6c75c53
feat: 채팅 페이지 구현
hamo-o Nov 3, 2022
600c678
chore: components 폴더 정리
hamo-o Nov 3, 2022
2156387
feat: chatRoom navigate 처리
hamo-o Nov 3, 2022
635e28a
feat: useInput 구현
hamo-o Nov 4, 2022
27f77b3
feat: 검색 기능 구현
hamo-o Nov 4, 2022
8f0e12d
fix: ChatRoom 유저 설정
hamo-o Nov 4, 2022
0c65cb3
feat: 선택된 유저 구현
hamo-o Nov 4, 2022
b9373b9
fix: 친구목록 curUser 수정
hamo-o Nov 4, 2022
7d40c42
refactor: useInput ChatInput에 활용
hamo-o Nov 4, 2022
d9a7387
chore: 프로필 변경
hamo-o Nov 4, 2022
4136723
feat: 상태메시지 추가
hamo-o Nov 4, 2022
fba91c7
design: font 저장
hamo-o Nov 4, 2022
989892f
fix: img 깨짐 수정
hamo-o Nov 5, 2022
e3a8b9a
fix: key값 오류 수정
hamo-o Nov 5, 2022
0a5f2b7
fix: ChatBox key값 중복 해결
hamo-o Nov 5, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 26 additions & 2 deletions src/components/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,31 @@
import styled from 'styled-components';

const Header = () => {
return;
interface Props {
leftChild: string;
rightChild: string;
}

const Header = ({ leftChild, rightChild }: Props) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leftChild , rightChild가 생소해서 조금 찾아보니까 컴포넌트 재사용률을 더 높일 수 있는 방법이었네요... 덕분에 알아갑니다 하핫

return (
<Wrapper>
<Title>{leftChild}</Title>
<div>{rightChild}</div>
</Wrapper>
);
};

const Wrapper = styled.div`
width: 100%;

display: flex;
justify-content: space-between;
`;

const Title = styled.div`
padding: 1.5rem;

font-size: 1.2rem;
font-weight: bold;
`;

export default Header;
13 changes: 12 additions & 1 deletion src/components/Navigator.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
import styled from 'styled-components';

const Navigator = () => {
return;
return <Nav></Nav>;
};

const Nav = styled.div`
width: 18%;
height: 100%;

border-top-left-radius: 20px;
border-bottom-left-radius: 20px;
background: rgb(230, 230, 230);
`;

export default Navigator;
8 changes: 7 additions & 1 deletion src/pages/ChatList.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import styled from 'styled-components';

import Navigator from '../components/Navigator';

const ChatList = () => {
return <Container></Container>;
return (
<Container>
<Navigator />
</Container>
);
};

const Container = styled.div`
Expand Down
12 changes: 9 additions & 3 deletions src/pages/FriendList.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
import styled from 'styled-components';

import Navigator from '../components/Navigator';
import Header from '../components/Header';

const FriendList = () => {
return <Container></Container>;
return (
<Container>
<Navigator />
<Header leftChild={'친구'} rightChild={''} />
</Container>
);
};

const Container = styled.div`
width: 25rem;
height: 40rem;

display: flex;
flex-direction: column;
justify-content: center;

border-radius: 20px;
box-shadow: 1px 1px 10px lightgray;
Expand Down
8 changes: 7 additions & 1 deletion src/pages/Setting.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import styled from 'styled-components';

import Navigator from '../components/Navigator';

const Setting = () => {
return <Container></Container>;
return (
<Container>
<Navigator />
</Container>
);
};

const Container = styled.div`
Expand Down