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 70 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
97b7ad0
feat : 1. GlobalStyle.tsx 작성
Mar 24, 2024
72664bf
feat : 대화기록 없는 채팅방 초기화면 구현
Mar 24, 2024
e6afb9d
feat : 대화기록x 일 때 하단 입력바 구현
Mar 24, 2024
f4a37d1
feat: Footer 클릭시 너비 토글 및 버튼 구조 변경 구현
Mar 24, 2024
56cda24
feat : 1. 메세지 입력 후 전송 시 화면 랜더링 기능 구현
Mar 25, 2024
75df157
style : header, body, footer 차지하는 공간 조정
Mar 25, 2024
b8f3cd0
style :1. 아이폰 헤더, 아이폰 하단바 컴포넌트 추가
Mar 26, 2024
5010109
fix : 현재 확장된 상태일 때만 input 너비 늘어나게 하기
Mar 26, 2024
133b491
feat : 프로필 컨테이너 클릭시 사용자 토글 기능 구현
Mar 26, 2024
f88406f
feat : 1. fakedata들 .json 파일로 바꿈
Mar 26, 2024
0241920
feat : localstorage 저장 기능 구현
Mar 26, 2024
5751431
1. fix : 로컬스토리지 중복 제거 후 불러오기..
Mar 26, 2024
ecefc85
fix : 배포 후 날짜 로직 수정, 이미지 url 수정
Mar 26, 2024
bcebf8b
style : input box 패딩, 스크롤바 커스텀
Mar 29, 2024
1845a0f
feat : 메세지 꼬리물기 그룹화 구현 (기준은1분)
Mar 29, 2024
5a2be3d
feat : 각 시간대의 첫 메세지에만 프로필 사진 뜨도록 구현
Mar 29, 2024
8752429
feat : 상대방의 메세지에 공감 누를 수 있는 기능 구현
Mar 29, 2024
16c9841
feat : localstorage에 공감내용 저장, 불러옴
Mar 29, 2024
2477466
fix : 사파리에서 invalid Date 오류 해결..?!
Mar 29, 2024
bab1796
fix : safari 날짜 invalid date
Mar 29, 2024
26c6149
fix : 날짜오류해결
Mar 29, 2024
c9c860a
fix : invalid Date 임시 수정
Mar 29, 2024
a66dd9f
fix : 날짜, 시간 포맷팅 함수 수정
Mar 29, 2024
d9a095b
feat : 내가 보낸 메세지에도 공감할 수 있는 기능 구현
Mar 30, 2024
2664e08
style : 프로필 사진 메세지 최상단에 위치
Mar 30, 2024
8498caf
style: 모바일뷰에서 인풋박스 색상 통일
Mar 30, 2024
c764cb8
fix : 한글 입력 마지막 글자 중복 오류 해결
Mar 30, 2024
4b79a07
fix : 한글 중복입력 방지
Mar 30, 2024
ec7c4be
style : input칸 색상, 마진 조정
Mar 30, 2024
4a82944
style : footer 색 제거
Mar 30, 2024
7688f11
style : 너비 설정
Mar 30, 2024
438f6bd
feat : ChatList.tsx, ChatListHeader.tsx, ChatListFooter.tsx 구현
Apr 27, 2024
6a36bc0
feat : 1. ChatList
May 2, 2024
d6f6da9
feat : MyPageHeader.tsx
May 2, 2024
9407851
feat : MyPage 화면 구현
May 2, 2024
c892014
feat : MyPage 전체 화면 구현, SNS 링크 추가
May 2, 2024
d8e5289
feat : 대화창에서 검색기능 구현
May 2, 2024
54b348f
feat : 친구 검색 기능 구현
May 3, 2024
ee336a4
feat : 통화화면 및 기능 구현
May 3, 2024
af0aba2
style : 헤더 색상 동적으로 변경
May 3, 2024
79c3f6b
fix : 메세지 송수신자 토글시 오류나던거 고침
May 3, 2024
9eea7d3
feat : 대화내용이 있는 애들만 리스트에 랜더링
May 3, 2024
2ca5f03
feat : 대화내용 없는 채팅방에서 프로필 컴포넌트 랜더링 기능 구현
May 3, 2024
253d9a2
chore : BackspaceButton 이미지 파일로 교체
May 3, 2024
e7979ae
fix : 모바일에서 이미지 랜딩 안되는 오류해결..?
May 3, 2024
f46f1d7
fix : 이미지파일 이름 수정안한거수정...;;
May 3, 2024
10df23b
chore : iphone header, footer 배경색 동적으로 변경
May 3, 2024
03bf48c
chore : Call Icon 변경
May 3, 2024
4798dff
chore : svg를 png로 변경
May 3, 2024
d14b728
chore : svg -> png
May 3, 2024
a2131c4
chore : 화면 전환 애니메이션효과 추가
May 3, 2024
076f1b3
feat : 1. 친구화면에서 전화화면으로 바로 전환
May 3, 2024
454e515
feat : 전달 받은 전화번호 표준형(?)으로 변경
May 3, 2024
f037738
readme 작성
May 3, 2024
c846ab8
fix : 전화버튼 안뜨는거 수정 ㅠ
May 3, 2024
4dab785
chore : button cursor: pointer 추가
May 3, 2024
8ea575e
feat : 대화내용 최신순으로 정렬
May 3, 2024
8e7b512
feat : 대화 내역 없는 사용자와 새로운 대화 기능 구현
May 3, 2024
903c144
fix : ChatApp에 UserId 빼먹고 라우팅했던거 수정
May 3, 2024
86b7fd6
chore : 무언가를 고침
May 3, 2024
97d5a27
fix : 이미지 절대 경로 수정
Shunamo May 3, 2024
577f021
fix : Call-icon 이미지 경로 해결
May 3, 2024
e0fc443
fix : Call-icon 이미지 경로 해결
May 3, 2024
8e71e9d
feat : 채팅방 헤더의 전화버튼도 기능 활성화
May 4, 2024
0ec9503
chore : readme 수정
May 4, 2024
cb5504d
chore : readme 수정
May 4, 2024
252c8d1
feat : 채팅방 삭제기능 구현
May 4, 2024
b57e56d
feat : 전화 통화 화면 구현~!
May 4, 2024
82344bc
chore : mute, speaker active 아이콘 활성화
May 4, 2024
81ddbaa
fix : NewChatList user 0 제외, 대화내역 없을 경우 label
May 4, 2024
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
267 changes: 241 additions & 26 deletions README.md

Large diffs are not rendered by default.

17,230 changes: 6,508 additions & 10,722 deletions package-lock.json

Large diffs are not rendered by default.

26 changes: 23 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,19 @@
"@testing-library/user-event": "^13.5.0",
"@types/jest": "^27.5.2",
"@types/node": "^16.18.91",
"@types/react": "^18.2.69",
"@types/react-dom": "^18.2.22",
"framer-motion": "^11.0.22",
"json5": "^2.2.3",
"perfect-scrollbar": "^1.5.5",
"react": "^18.2.0",
"react-custom-scrollbars": "^4.2.1",
"react-dom": "^18.2.0",
"react-scripts": "5.0.1",
"typescript": "^4.9.5",
"react-router": "^6.23.0",
"react-router-dom": "^6.23.0",
"react-scripts": "^5.0.1",
"react-transition-group": "^4.4.5",
"recoil": "^0.7.7",
"styled-components": "^6.1.8",
"web-vitals": "^2.1.4"
},
"scripts": {
Expand All @@ -39,5 +46,18 @@
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"@babel/core": "^7.24.3",
"@babel/preset-env": "^7.24.3",
"@types/babel__traverse": "^7.20.5",
"@types/react": "^18.2.69",
"@types/react-custom-scrollbars": "^4.0.13",
"@types/react-router": "^5.1.20",
"@types/react-router-dom": "^5.3.3",
"@types/styled-components": "^5.1.34",
"@typescript-eslint/eslint-plugin": "^7.3.1",
"@typescript-eslint/parser": "^7.3.1",
"typescript": "^5.4.3"
}
}
Binary file added public/assets/Call (3).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/Call.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/Call1-active.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/Call1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions public/assets/Clip.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions public/assets/DeletePhoneCall.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/Ellipse 1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/EndCall.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/Friend-active.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/Friend.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions public/assets/Group 6 (1).svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/assets/Group 7.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/Haksarang.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/Home Indicator.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/Instagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/Message-bubble-active.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/Message-bubble.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/Myeonjyeop.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/Property 1=_haha.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/Property 1=angry.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/Property 1=love.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/Property 1=thumbs up.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/SmallProfile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions public/assets/Status Bar.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/Variant6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/assets/Vector 563.svg
3 changes: 3 additions & 0 deletions public/assets/Vector 564.svg
Binary file added public/assets/YouTube.png
Binary file added public/assets/back.png
Binary file added public/assets/icon (1).png
Binary file added public/assets/icon (2).png
Binary file added public/assets/icon (3).png
Binary file added public/assets/icon.png
5 changes: 5 additions & 0 deletions public/assets/icon.svg
Binary file added public/assets/magnifying-glass.png
Binary file added public/assets/mute-active.png
Binary file added public/assets/mute.png
9 changes: 9 additions & 0 deletions public/assets/profile (1).svg

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions public/assets/profile (2).svg

Large diffs are not rendered by default.

Binary file added public/assets/profile.png
9 changes: 9 additions & 0 deletions public/assets/profile.svg

Large diffs are not rendered by default.

Binary file added public/assets/send icon.png
Binary file added public/assets/size=big.png
Binary file added public/assets/sound-active.png
Binary file added public/assets/sound.png
Binary file removed public/favicon.ico
Binary file not shown.
52 changes: 11 additions & 41 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -1,43 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.

Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.

You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.

To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=no">
<title>Messenger S&Y</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
</body>
</html>
Binary file removed public/logo192.png
Diff not rendered.
Binary file removed public/logo512.png
Diff not rendered.
25 changes: 0 additions & 25 deletions public/manifest.json

This file was deleted.

3 changes: 0 additions & 3 deletions public/robots.txt

This file was deleted.

38 changes: 0 additions & 38 deletions src/App.css

This file was deleted.

54 changes: 47 additions & 7 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,49 @@
function App() {
return (
<div>
<h1>19기 프론트엔드 파이팅!!! 디자인과 사이좋게 지내요~~~</h1>
</div>
);
}
import React, { useState } from 'react';
import { AnimatePresence } from 'framer-motion';
import { BrowserRouter as Router, Routes, Route, useLocation } from 'react-router-dom';
import { RecoilRoot } from 'recoil';
import ChatList from './components/list/ChatList';
import ChatApp from './components/main/ChatApp';
import FriendList from './components/list/FriendList';
import GlobalStyle from './components/style/GlobalStyle';
import MyPage from './components/list/MyPage'
import PhoneCall from './components/list/PhoneCall';
import ActiveCall from './components/list/ActiveCall';



const AnimatedRoutes = () => {
const location = useLocation(); // 현재 위치를 가져옴
const [phoneNumber, setPhoneNumber] = useState("");



return (
<AnimatePresence mode='wait'>
<Routes location={location} key={location.pathname}>
<Route path="/" element={<ChatList />} />
<Route path="/chat/:userId" element={<ChatApp />} />
<Route path="/friends" element={<FriendList />} />
<Route path="/mypage" element={<MyPage/>}/>
<Route path="/phone" element={<PhoneCall/>}/>
<Route path="/active-call" element={ <ActiveCall phoneNumber={phoneNumber} />} />
</Routes>
</AnimatePresence>
);
};


Comment on lines +20 to +35

Choose a reason for hiding this comment

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

React Router와 Framer Motion을 결합하여 애니메이션 효과를 포함한 라우팅을 구현하신게 정말 사용자 경험면에 있어서 좋은 것 같아요.
AnimatePresence 컴포넌트로 페이지를 전환할 때마다 매끄러운 애니메이션 처리해주신게 인상깊습니다.
라우팅을 정말 잘 구현하신 것 같아요..!


const App: React.FC = () => {
Copy link

Choose a reason for hiding this comment

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

React.FC를 사용하면 children의 타입을 일일이 작성하지 않아도 되지만,
리액트 17 이하 버전에서 props는 type이 ReactNode인 children을 암시적으로 가지고 있어
React.FC를 사용하는 것은 안티 패턴이라고 합니다..!

리액트에서 FC를 사용하지 말아야하는 이유


return (
<RecoilRoot>
<Router>
<GlobalStyle />
<AnimatedRoutes />
</Router>
</RecoilRoot>
);
};

export default App;
Loading