-
Notifications
You must be signed in to change notification settings - Fork 12
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주차] 강나연 미션 제출합니다. #15
Open
kongnayeon
wants to merge
53
commits into
CEOS-Developers:master
Choose a base branch
from
kongnayeon:kongnayeon2
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
442d3fa
:ribbon: style: Apply GlobalStyle
kongnayeon a15694b
:ribbon: style: Add Header
kongnayeon 5b9a82c
:bookmark_tabs: docs: Create json files
kongnayeon c22c791
:ribbon: style: Add MessageInput
kongnayeon 025acf5
:ribbon: style: Style Bubble
kongnayeon 4a646fa
:speech_balloon: feat: Add useInput
kongnayeon 20d5fe3
:speech_balloon: feat: Set recoil(...)
kongnayeon 667fc8c
:speech_balloon: feat: Add toggle
kongnayeon 7fda096
:speech_balloon: feat: Scroll to bottom
kongnayeon d8ee77c
:pill: fix: Fix toggle
kongnayeon 2cead51
:adhesive_bandage: chore: Delete console.log
kongnayeon e3c1169
:hammer: refactor: Use Selector
kongnayeon e833cbd
:ribbon: style: Style Scrollbar
kongnayeon e78886b
:speech_balloon: feat: Show profile image
kongnayeon 57411d3
:speech_balloon: feat: Show send time
kongnayeon 7852973
:adhesive_bandage: chore: Delete any
kongnayeon 152975f
:speech_balloon: feat: Show user name
kongnayeon 630e352
:ribbon: style: Set favicon
kongnayeon 086103b
:ribbon: style: Change font
kongnayeon a16cb81
:hammer: refactor: Add HeaderProps interface
kongnayeon 617f488
:pill: fix: Add word-break
kongnayeon 1e29bc6
:pill: fix: Prevent re-rendering by using React.memo
kongnayeon 5efa867
:speech_balloon: feat: Set router
kongnayeon 4efa71e
:speech_balloon: feat: Add Navigation
kongnayeon 917cbb3
:speech_balloon: feat: Add data
kongnayeon ff894a1
:speech_balloon: feat: Set FriendsPage
kongnayeon fd1ad06
:speech_balloon: feat: Set ChatListPage
kongnayeon c086320
:speech_balloon: feat: Set SettingPage
kongnayeon 0d69c58
:speech_balloon: feat: Add My Profile
kongnayeon 80542b2
:hammer: refactor:separate UserList
kongnayeon 36d555a
:ribbon: style: Style FriendsPage and ChatListPage
kongnayeon f6d0376
:ribbon: style: Style scrollbar
kongnayeon 3b7802c
:adhesive_bandage: chore: Edit ChatMessage
kongnayeon cae7c7d
:speech_balloon: feat: Add SearchList
kongnayeon 0f382c0
:pill: fix: Fix SearchInput
kongnayeon 033cacd
:speech_balloon: feat: Add ToggleSwitch
kongnayeon e77c472
:adhesive_bandage: chore: Set accountState when entering chat room
kongnayeon 4934a82
:bookmark_tabs: docs: Change ChatMessage.json
kongnayeon f0a7fb7
:pill: fix: Fix ChatList sorting
kongnayeon 9c55ab7
:pill: fix: Fix roomId initialization when refreshing
kongnayeon 130d574
:speech_balloon: feat: Set MainPage
kongnayeon dc80158
:speech_balloon: feat: Add clicked icon
kongnayeon 8cda05d
:speech_balloon: feat: Add modal
kongnayeon daa2002
:bookmark_tabs: docs: Clean up directory
kongnayeon 7a6107d
:adhesive_bandage: chore: Remove console.log
kongnayeon 71f2c4e
:adhesive_bandage: chore: Set config core.ignorecase false
kongnayeon f0555d0
Fix vercel deployment error
kongnayeon 5133d49
Fix vercel error 2
kongnayeon 0dbc446
Delete src/components directory
kongnayeon 519f342
Add files via upload
kongnayeon a9539cf
Add files via upload
kongnayeon 3f145bf
:pill: fix: Refresh when clicking on the main page
kongnayeon f3a3728
:ribbon: style: Remove text decoration
kongnayeon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,49 @@ | ||
import styled from "styled-components"; | ||
import ChatRoom from "./pages/ChatRoom"; | ||
import ChatListPage from "./pages/ChatListPage"; | ||
import GlobalStyle from "./styles/GlobalStyle"; | ||
import { RecoilRoot } from "recoil"; | ||
import { BrowserRouter, Route, Routes } from "react-router-dom"; | ||
import FriendsPage from "./pages/FriendsPage"; | ||
import SettingPage from "./pages/SettingPage"; | ||
import MainPage from "./pages/MainPage"; | ||
|
||
function App() { | ||
return <div>화이팅!!</div>; | ||
return ( | ||
<BrowserRouter> | ||
<RecoilRoot> | ||
<GlobalStyle /> | ||
<Container> | ||
<Routes> | ||
<Route path="/" element={<MainPage />} /> | ||
<Route path="/friends" element={<FriendsPage />} /> | ||
<Route path="/chats" element={<ChatListPage />} /> | ||
<Route path="/room/:roomid" element={<ChatRoom />} /> | ||
<Route path="/settings" element={<SettingPage />} /> | ||
</Routes> | ||
</Container> | ||
</RecoilRoot> | ||
</BrowserRouter> | ||
); | ||
} | ||
|
||
// ㄱ- | ||
// const PhoneImage = styled.img` | ||
// width: 26rem; | ||
// z-index: 1; | ||
// position: absolute; | ||
// top: 7%; | ||
// left: 37%; | ||
// `; | ||
|
||
const Container = styled.div` | ||
width: 23rem; | ||
height: 45rem; | ||
background: rgba(255, 255, 255, 0.8); | ||
border-radius: 20px; | ||
box-shadow: 0px 0px 20px rgb(125, 123, 125); | ||
display: flex; | ||
flex-direction: column; | ||
`; | ||
|
||
export default App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
{ | ||
"chatrooms": [ | ||
{ | ||
"roomid": 0, | ||
"user": 1, | ||
"chats": [ | ||
{ | ||
"userid": 1, | ||
"chatid": 1664469417344, | ||
"myAccount": false, | ||
"chat": "내가 만든 쿠키 🍪", | ||
"time": "10월 3일" | ||
}, | ||
{ | ||
"userid": 0, | ||
"chatid": 1664469417345, | ||
"myAccount": true, | ||
"chat": "너를 위해 구웠지 😽", | ||
"time": "10월 3일" | ||
} | ||
] | ||
}, | ||
{ | ||
"roomid": 1, | ||
"user": 2, | ||
"chats": [ | ||
{ | ||
"userid": 2, | ||
"chatid": 1664469417346, | ||
"myAccount": false, | ||
"chat": "느린 한마디보다 조용함이 더 좋아", | ||
"time": "10월 4일" | ||
}, | ||
{ | ||
"userid": 0, | ||
"chatid": 1664469417347, | ||
"myAccount": true, | ||
"chat": "기다리고 있지만 매일 이런 건 아냐", | ||
"time": "10월 4일" | ||
} | ||
] | ||
}, | ||
{ | ||
"roomid": 2, | ||
"user": 3, | ||
"chats": [ | ||
{ | ||
"userid": 0, | ||
"chatid": 1664469417349, | ||
"myAccount": true, | ||
"chat": "에이 티 티 이 엔 티 아이 온~", | ||
"time": "10월 28일" | ||
}, | ||
{ | ||
"userid": 3, | ||
"chatid": 1664469417348, | ||
"myAccount": false, | ||
"chat": "Attention is what I want~", | ||
"time": "10월 28일" | ||
} | ||
] | ||
}, | ||
{ | ||
"roomid": 3, | ||
"user": 4, | ||
"chats": [ | ||
{ | ||
"userid": 4, | ||
"chatid": 1664469417350, | ||
"myAccount": false, | ||
"chat": "내 지난 날들은 눈 뜨면 잊는 꿈", | ||
"time": "10월 29일" | ||
}, | ||
{ | ||
"userid": 0, | ||
"chatid": 1664469417351, | ||
"myAccount": true, | ||
"chat": "Hype boy 너만 원해~", | ||
"time": "10월 29일" | ||
}, | ||
{ | ||
"userid": 4, | ||
"chatid": 1664469417352, | ||
"myAccount": false, | ||
"chat": "Hype boy 내가 전해~", | ||
"time": "10월 29일" | ||
} | ||
] | ||
}, | ||
{ | ||
"roomid": 4, | ||
"user": 5, | ||
"chats": [ | ||
{ | ||
"userid": 0, | ||
"chatid": 1664469417360, | ||
"myAccount": true, | ||
"chat": "아니 얘네 왜 노래가 4곡밖에 없냐 ㄱ-", | ||
"time": "11월 1일" | ||
}, | ||
{ | ||
"userid": 5, | ||
"chatid": 1664469417354, | ||
"myAccount": false, | ||
"chat": "ㅜ.ㅜ", | ||
"time": "11월 1일" | ||
} | ||
] | ||
}, | ||
{ | ||
"roomid": 5, | ||
"user": 6, | ||
"chats": [ | ||
{ | ||
"userid": 6, | ||
"chatid": 1664469417370, | ||
"myAccount": false, | ||
"chat": "뉴진스 컴백", | ||
"time": "11월 2일" | ||
}, | ||
{ | ||
"userid": 0, | ||
"chatid": 1664469417371, | ||
"myAccount": true, | ||
"chat": "언제야~~?", | ||
"time": "11월 2일" | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"users": [ | ||
{ | ||
"userid": 0, | ||
"name": "NaYeon 💭", | ||
"statusMessage": "\"Hell\"O World!..." | ||
}, | ||
{ | ||
"userid": 1, | ||
"name": "NewJeans 👖", | ||
"statusMessage": "🍉🥭🥥🥑🍓" | ||
}, | ||
{ | ||
"userid": 2, | ||
"name": "HaeRin 😽", | ||
"statusMessage": "😎👖" | ||
}, | ||
{ | ||
"userid": 3, | ||
"name": "HANNI 🐰", | ||
"statusMessage": "🦭 hi hi~~~~" | ||
}, | ||
{ | ||
"userid": 4, | ||
"name": "Danielle 🍀", | ||
"statusMessage": "Hi 🌻 Hi!🌻" | ||
}, | ||
{ | ||
"userid": 5, | ||
"name": "MINJI 🍒", | ||
"statusMessage": "🧡" | ||
}, | ||
{ | ||
"userid": 6, | ||
"name": "HYEIN 🍼", | ||
"statusMessage": "let..s be friennnnnnnd👽👽👽👽" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
import { useRecoilState, useRecoilValue } from "recoil"; | ||
import styled from "styled-components"; | ||
import { HeaderProps } from "../interfaces/interface"; | ||
import { accountState, SearchState, userSelector } from "../store/atom"; | ||
import { useNavigate } from "react-router-dom"; | ||
|
||
const Header = ({ | ||
leftChild, | ||
rightChild, | ||
textChild, | ||
isFriendsPage, | ||
}: HeaderProps) => { | ||
const navigate = useNavigate(); | ||
const [userAccount, setUserAccount] = useRecoilState(accountState); | ||
const filteredUser = useRecoilValue(userSelector); | ||
const [isSearching, setIsSearching] = useRecoilState(SearchState); | ||
|
||
const headText = textChild | ||
? textChild | ||
: userAccount | ||
? filteredUser!.name | ||
: "NaYeon 💭"; | ||
|
||
const handleHeadTextClick = () => { | ||
setUserAccount(!userAccount); | ||
}; | ||
|
||
const handleRightChildClick = () => { | ||
const toggledSearch = !isSearching; | ||
isFriendsPage ? setIsSearching(toggledSearch) : setIsSearching(false); | ||
}; | ||
|
||
return ( | ||
<HeaderWrapper> | ||
<HeaderButton onClick={() => navigate(-1)}>{leftChild}</HeaderButton> | ||
<HeadText onClick={handleHeadTextClick}>{headText}</HeadText> | ||
<HeaderButton onClick={handleRightChildClick}>{rightChild}</HeaderButton> | ||
</HeaderWrapper> | ||
); | ||
}; | ||
|
||
const HeaderWrapper = styled.header` | ||
display: flex; | ||
align-items: center; | ||
`; | ||
|
||
const HeaderButton = styled.button` | ||
width: 40px; | ||
height: 40px; | ||
background: #fff; | ||
border-radius: 100%; | ||
border: 1px solid #000000; | ||
text-decoration: none; | ||
color: #000; | ||
font-size: 1.5rem; | ||
padding: 0.5rem; | ||
line-height: 15px; | ||
text-align: center; | ||
cursor: pointer; | ||
transition: 0.5s; | ||
`; | ||
|
||
const HeadText = styled.span` | ||
width: 80%; | ||
font-size: 1.3rem; | ||
font-weight: bold; | ||
padding-left: 1rem; | ||
cursor: pointer; | ||
transition: 0.5s; | ||
`; | ||
|
||
export default Header; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아 이런 식으로 하면 단체톡방을 만든다든지 할 때 편할 것 같아요!! 배워갑니다
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
사실 단체 톡방도 만들어 보고 싶어서 이렇게 만든 건데 시간 나면 추가로 구현해 봐야겠어욥 ㅎ.ㅎ...!!