-
Notifications
You must be signed in to change notification settings - Fork 9
[3주차] 이소정 미션 제출합니다. #13
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
Open
kather0220
wants to merge
19
commits into
CEOS-Developers:kather0220
Choose a base branch
from
kather0220:main
base: kather0220
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
19 commits
Select commit
Hold shift + click to select a range
627e9ad
feat : implement router and add pages
lsj5723 dba58d5
feat : add UserID file and show them on the FriendList file
lsj5723 4e2c76a
feat : implement search from friends list
lsj5723 dc23052
style : adjust chatting screen display
lsj5723 394f0c8
chore : merge branch to main
lsj5723 0be4c1e
feat : set chat user by userID
lsj5723 9de824b
style : overall design of setting page
lsj5723 69ece36
style : edit navigation icons, color, and size
lsj5723 af0365e
style : change header color and others
lsj5723 55a45d9
feat : load status message and profile music
lsj5723 688d08e
feat : add home page
lsj5723 cad5532
fix : add more friend lists
lsj5723 e21ca92
style : add gradient border on the header profile image
lsj5723 2c6ae0d
style : change header colors
lsj5723 528b4f6
docs : integrate list header file
lsj5723 dba3517
style : add cursor properties
lsj5723 7702f10
chore : merge branch
lsj5723 15d4977
docs : transfer chatting and friend data to .json file
lsj5723 f747ff1
feat : show last chatted message on the chat list
lsj5723 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
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or 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
This file contains hidden or 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
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.
File renamed without changes
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 hidden or 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,5 @@ | ||
| a { | ||
| text-decoration: inherit; | ||
| color: inherit; | ||
| cursor: inherit; | ||
| } |
This file contains hidden or 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,79 +1,24 @@ | ||
| import React, {useState} from 'react'; | ||
| import Header from './Header'; | ||
| import ChatContainer from './ChatContainer'; | ||
| import ChatForm from './ChatForm'; | ||
| import React from 'react'; | ||
| import {HashRouter, Route} from 'react-router-dom'; | ||
| import ChattingList from './ChattingList'; | ||
| import Navigation from './Navigation'; | ||
| import FriendList from './FriendList'; | ||
| import SettingPage from './SettingPage'; | ||
| import ChattingScreen from './ChattingScreen'; | ||
| import Home from './Home'; | ||
| import './App.css'; | ||
|
|
||
| const App = () => { | ||
| const [currentUser, setCurrentUser] = useState(1) | ||
| const [message,setMessage] = useState([ | ||
| { | ||
| id: 1, | ||
| text: "Hi", | ||
| isUser: 0 | ||
| }, | ||
| { | ||
| id: 2, | ||
| text: "Hello", | ||
| isUser: 1 | ||
| }, | ||
| { | ||
| id: 3, | ||
| text: "What do you do today?", | ||
| isUser: 1 | ||
| }, | ||
| { | ||
| id: 4, | ||
| text: "I'm standing on the concert. Would you come? I already left a ticket for you!", | ||
| isUser: 0 | ||
| }, | ||
| { | ||
| id: 5, | ||
| text: "Of course!!!! I'm eagerly waiting for it!!", | ||
| isUser: 1 | ||
| }, | ||
| ]); | ||
| const submitMessage = (sendText) => { | ||
| const newMessage = message.concat({ | ||
| id: new Date(), | ||
| text: sendText, | ||
| isUser: currentUser | ||
| }) | ||
| setMessage(newMessage); | ||
| const App = () =>{ | ||
| return ( | ||
| <HashRouter> | ||
| <Navigation /> | ||
| <Route path="/" exact={true} component={Home} /> | ||
| <Route path="/friend-list" component={FriendList} /> | ||
| <Route path="/chatting-list" component={ChattingList} /> | ||
| <Route path="/setting-page" component={SettingPage} /> | ||
| <Route path="/chatting-screen/:id" component={ChattingScreen}/> | ||
| </HashRouter> | ||
| ); | ||
| } | ||
| const users = [ | ||
| { | ||
| id: 0, | ||
| name: "THE BOYZ", | ||
| img: "profile2.jpg", | ||
| }, | ||
| { | ||
| id: 1, | ||
| name: "KATHERINE", | ||
| img: "profile1.jpg", | ||
| }, | ||
| ]; | ||
| const [user,setUsers] = useState(users[0]); | ||
|
|
||
|
|
||
| function handleClick() { | ||
| if(currentUser === 0){ | ||
| setCurrentUser(1); | ||
| } | ||
| else{ | ||
| setCurrentUser(0); | ||
| } | ||
| } | ||
| return ( | ||
| <div> | ||
| <div onClick={handleClick}> | ||
| <Header user={users[currentUser]} /> | ||
| </div> | ||
|
|
||
| <ChatContainer message={message} user={user}/> | ||
|
|
||
| <ChatForm submitMessage={submitMessage} {...{currentUser}}/> | ||
| </div> | ||
| ); | ||
| } | ||
|
|
||
| export default App; | ||
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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,137 @@ | ||
| [ | ||
| { | ||
| "id": 1, | ||
| "text": "Hi", | ||
| "isUser": 0, | ||
| "receiver": 0 | ||
| }, | ||
| { | ||
| "id": 2, | ||
| "text": "Hello", | ||
| "isUser": 1, | ||
| "receiver": 0 | ||
| }, | ||
| { | ||
| "id": 3, | ||
| "text": "What do you do today?", | ||
| "isUser": 1, | ||
| "receiver": 0 | ||
| }, | ||
| { | ||
| "id": 4, | ||
| "text": "I'm standing on the concert. Would you come? I already left a ticket for you!", | ||
| "isUser": 0, | ||
| "receiver": 0 | ||
| }, | ||
| { | ||
| "id": 5, | ||
| "text": "Of course!!!! I'm eagerly waiting for it!!", | ||
| "isUser": 1, | ||
| "receiver": 0, | ||
| "last": true | ||
| }, | ||
| { | ||
| "id": 6, | ||
| "text": "언니!!!!!", | ||
| "isUser": 2, | ||
| "receiver": 2 | ||
| }, | ||
| { | ||
| "id": 7, | ||
| "text": "울 묭이 보고싶어 흐엉", | ||
| "isUser": 1, | ||
| "receiver": 2, | ||
| "last": true | ||
| }, | ||
| { | ||
| "id": 8, | ||
| "text": "영아 나 너네 집 또 갈래", | ||
| "isUser": 1, | ||
| "receiver": 3 | ||
| }, | ||
| { | ||
| "id": 9, | ||
| "text": "언제든 컴온", | ||
| "isUser": 3, | ||
| "receiver": 3, | ||
| "last": true | ||
| }, | ||
| { | ||
| "id": 10, | ||
| "text": "내 이름은 소정", | ||
| "isUser": 4, | ||
| "receiver": 4 | ||
| }, | ||
| { | ||
| "id": 11, | ||
| "text": "세 살이지", | ||
| "isUser": 4, | ||
| "receiver": 4, | ||
| "last": true | ||
| }, | ||
| { | ||
| "id": 12, | ||
| "text": "소정아 술마시자", | ||
| "isUser": 5, | ||
| "receiver": 5 | ||
| }, | ||
| { | ||
| "id": 13, | ||
| "text": "꺄 조아조아", | ||
| "isUser": 1, | ||
| "receiver": 5, | ||
| "last": true | ||
| }, | ||
| { | ||
| "id": 14, | ||
| "text": "아 이게 뭐야 왜 아무도 없숴", | ||
| "isUser": 6, | ||
| "receiver": 6 | ||
| }, | ||
| { | ||
| "id": 14, | ||
| "text": "쭈냥이 귀여워", | ||
| "isUser": 1, | ||
| "receiver": 6, | ||
| "last": true | ||
| }, | ||
| { | ||
| "id": 15, | ||
| "text": "굠이 너는 항상 최고야", | ||
| "isUser": 1, | ||
| "receiver": 7, | ||
| "last": true | ||
| }, | ||
| { | ||
| "id": 16, | ||
| "text": "새벽 여섯시면 안 잔건가요 일어난건가요!", | ||
| "isUser": 8, | ||
| "receiver": 8 | ||
| }, | ||
| { | ||
| "id": 17, | ||
| "text": "안 잔거에요", | ||
| "isUser": 1, | ||
| "receiver": 8 | ||
| }, | ||
| { | ||
| "id": 18, | ||
| "text": "....늘 건강 최우선임동", | ||
| "isUser": 8, | ||
| "receiver": 8, | ||
| "last": true | ||
| }, | ||
| { | ||
| "id": 19, | ||
| "text": "밍이 안 본지 몇 개월이냐ㅠ", | ||
| "isUser": 1, | ||
| "receiver": 9 | ||
| }, | ||
| { | ||
| "id": 20, | ||
| "text": "그러겡ㅠ", | ||
| "isUser": 9, | ||
| "receiver": 9, | ||
| "last": true | ||
| } | ||
| ] |
This file contains hidden or 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
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.
exact 쓸때는 보통
<Route exact path="/" component={Home} />이런식으로 많이 쓰이고 더 편하기도 한거 같아요혹시 뭔가 다른점이 있다면 알려주세요~