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 25 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
55e2444
feat : 초기 프로젝트 세팅
geeoneee Oct 29, 2023
c16ffdd
feat : 초기 프로젝트 세팅 2
geeoneee Oct 30, 2023
da530ab
feat : ChatRoom 상단 바
geeoneee Oct 30, 2023
1a6742e
feat : ChatRoom 하단 바
geeoneee Oct 30, 2023
6a8cc4b
chore : ChatRoom 상단바 하단바 스크롤 방지
geeoneee Oct 31, 2023
26722b8
feat : ChatRoom 프로필 표시, 시간 오류 수정
geeoneee Oct 31, 2023
e07981e
chore : ChatRoom send 버튼 hover
geeoneee Oct 31, 2023
e6b5e9b
feat : ChatRoom 날짜 표시 기능
geeoneee Oct 31, 2023
f7b0eac
feat : GlobalHeader 작성
geeoneee Oct 31, 2023
05de4aa
feat : GlobalFooter 작성
geeoneee Oct 31, 2023
ff56172
feat : GlobalFooter 화면 이동 및 색상 변경
geeoneee Nov 1, 2023
8c4ca96
feat : MyPage 컴포넌트 작성 및 외부 링크 연결
geeoneee Nov 1, 2023
ffb1afc
feat : Friend 작성
geeoneee Nov 2, 2023
6da668a
feat : GlobalHeader Search Icon 페이지 연결 및 색 변경 기능 추가
geeoneee Nov 2, 2023
9e394f2
feat : FriendSearch 검색 기능 구현
geeoneee Nov 2, 2023
2a0ea76
feat : 채팅목록 및 채팅 목록 검색 기능 구현
geeoneee Nov 2, 2023
8a3842e
feat : 채팅방 연결
geeoneee Nov 2, 2023
a829402
chore : ChatRoom 날짜 컴포넌트 수정
geeoneee Nov 2, 2023
be3d848
fix : ChatRoom 장문 대화 상대방 프로필 및 시간 수정
geeoneee Nov 2, 2023
9055edd
test : fixed 수정
geeoneee Nov 2, 2023
40ab029
chore : css 수정
geeoneee Nov 3, 2023
2adc168
test : 배포
geeoneee Nov 3, 2023
47c722f
fix : 오류 수정 및 채팅방 연결
geeoneee Nov 4, 2023
f2072ea
fix : 배포 오류 수정
geeoneee Nov 5, 2023
6cc9908
test : 재배포용
geeoneee Nov 5, 2023
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
4,878 changes: 2,351 additions & 2,527 deletions package-lock.json

Large diffs are not rendered by default.

20 changes: 15 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"fork-ts-checker-webpack-plugin": "^9.0.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-scripts": "5.0.1",
"web-vitals": "^2.1.4"
"react-router-dom": "^6.16.0",
"react-scripts": "^5.0.1",
"styled-components": "^6.0.8",
"styled-reset": "^4.5.1",
"typescript": "^4.0.5",
"zustand": "^4.4.1"
},
"scripts": {
"start": "react-scripts start",
Expand All @@ -34,5 +36,13 @@
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"@types/jest": "^29.5.5",
"@types/node": "^20.6.5",
"@types/react": "^18.2.22",
"@types/react-dom": "^18.2.7",
"@types/react-router-dom": "^5.3.3",
"@types/styled-components": "^5.1.27"
}
}
9 changes: 9 additions & 0 deletions public/assets/Property 1=behance.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions public/assets/Property 1=github.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions public/assets/Property 1=instagram.svg
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/Vector.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/arrow_forward_ios.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/attach_file.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/back.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions public/assets/be.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/chat.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/clip.svg
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/emotion.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/friend.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions public/assets/github.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/home.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions public/assets/instagram.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/link.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/menu.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/mypage.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/profile.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/search.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions public/assets/search_updown.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/send.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 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.
42 changes: 7 additions & 35 deletions src/App.css
Original file line number Diff line number Diff line change
@@ -1,38 +1,10 @@
.App {
text-align: center;
}

.App-logo {
height: 40vmin;
pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
.App-logo {
animation: App-logo-spin infinite 20s linear;
}
@font-face {
font-family: "Pretendard-Regular";
src: url("https://cdn.jsdelivr.net/gh/Project-Noonnu/[email protected]/Pretendard-Regular.woff")
format("woff");
font-style: normal;
}

.App-header {
background-color: #282c34;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: calc(10px + 2vmin);
color: white;
}

.App-link {
color: #61dafb;
}

@keyframes App-logo-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
.App {
font-family: "Pretendard-Regular";
}
25 changes: 0 additions & 25 deletions src/App.js

This file was deleted.

8 changes: 0 additions & 8 deletions src/App.test.js

This file was deleted.

61 changes: 61 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
import React from "react";
import "./App.css";
import { BrowserRouter, Route, Routes } from "react-router-dom";
import { styled, createGlobalStyle } from "styled-components";

import Chat from "./pages/chat/Chat";
import ChatRoom from "./pages/chatroom/ChatRoom";
import Friend from "./pages/friend/Friend";
import MyPage from "pages/mypage/MyPage";
import ChatSearch from "pages/chat/ChatSearch";
import FriendSearch from "pages/friend/FriendSearch";

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를 사용해서 타입 지정 하셨네요! 처음 typescript를 사용할 때 컴포넌트 타입을 어떻게 지정할지 고민이 많았는데 상당히 많은 방법이 있더라구요! 저는 일반적으로 컴포넌트 prop에 타입을 지정하는 편이에요! 찾아보니 FC에 대해 부정적인 생각들이 많더라구요
아래 링크 한 번 읽어보심 좋을 것 같아요~

https://bkjeon1614.tistory.com/768

return (
<BrowserRouter>
<Wrapper>
<StatusBarImage src="/assets/status_bar.svg" alt="back img" />
<Container>
<Routes>
<Route path="/" element={<Friend />} />
<Route path="/friendsearch" element={<FriendSearch />} />
<Route path="/chat" element={<Chat />} />
<Route path="/chatsearch" element={<ChatSearch />} />
<Route path="/mypage" element={<MyPage />} />
<Route path="/chatroom/:chatId" element={<ChatRoom />} />
</Routes>
</Container>
<HomeImage src="/assets/home.svg" alt="home img" />
</Wrapper>
<GlobalStyles />
</BrowserRouter>
);
};

export default App;

const Wrapper = styled.div``;

const Container = styled.div``;

export const GlobalStyles = createGlobalStyle`
*::-webkit-scrollbar {
width: 0;
}
body {
background-color: #f6f6f6;
font-family: "Pretendard-Regular";
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
}

#root {
background-color: white;
}
`;
Comment on lines +41 to +57

Choose a reason for hiding this comment

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

전역으로 스타일 정해서 전체 적용해주신 것 좋은 것 같아요!


const StatusBarImage = styled.img``;

const HomeImage = styled.img``;
Loading