-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #55 from Dear-project/Feature/Chat-#43
Feature/chat #43
- Loading branch information
Showing
32 changed files
with
1,012 additions
and
179 deletions.
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
275 changes: 275 additions & 0 deletions
275
src/app/detailed-information/personal-information/page.tsx
Large diffs are not rendered by default.
Oops, something went wrong.
88 changes: 88 additions & 0 deletions
88
src/app/detailed-information/personal-information/style.ts
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,88 @@ | ||
import styled from "styled-components"; | ||
|
||
export const InformationContainer = styled.div` | ||
min-width: 100px; | ||
width: 100%; | ||
height: 4800px; | ||
@media screen and (min-width: 100px) { | ||
font-size: 0.8rem; | ||
} | ||
@media screen and (min-width: 800px) { | ||
font-size: 1.2rem; | ||
} | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
row-gap: 15px; | ||
`; | ||
|
||
export const InformationHeadBox = styled.div` | ||
width: 100%; | ||
height: 100px; | ||
display: flex; | ||
`; | ||
export const InformationLogo = styled.img` | ||
width: 200px; | ||
height: 100%; | ||
margin-left: 50px; | ||
`; | ||
|
||
export const InformationContentContainer = styled.div` | ||
width: 70%; | ||
display: flex; | ||
flex-direction: column; | ||
row-gap: 20px; | ||
margin-bottom: 50px; | ||
`; | ||
|
||
export const InformationTitle = styled.h1` | ||
font-size: 30px; | ||
`; | ||
|
||
export const InformationContent = styled.p` | ||
line-height: 25px; | ||
`; | ||
|
||
export const InformationBtn = styled.button` | ||
position: fixed; | ||
width: 105px; | ||
height: 40px; | ||
background: #fece23; | ||
color: #fff; | ||
border-radius: 100px; | ||
border: none; | ||
right: 20px; | ||
bottom: 20px; | ||
cursor: pointer; | ||
&:hover { | ||
transition: 1s; | ||
background-color: black; | ||
color: white; | ||
} | ||
`; | ||
|
||
export const InformationImg = styled.img` | ||
width: 100%; | ||
min-height: 200px; | ||
`; | ||
export const InformationLinkBtn = styled.div` | ||
font-size: 30px; | ||
color: #000; | ||
&:hover { | ||
transition: 0.5s; | ||
color: #fece23; | ||
} | ||
`; | ||
|
||
export const NullState = styled.div` | ||
display: flex; | ||
width: 100%; | ||
height: 100px; | ||
`; |
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
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
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
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,41 @@ | ||
import React from "react"; | ||
import * as S from "./style"; | ||
import { ChatData } from "@/types/chat/chat.type"; | ||
interface ChatRoomProps { | ||
selectedChat: ChatData; | ||
messages: any[]; | ||
newMessage: string; | ||
setNewMessage: (value: string) => void; | ||
sendMessage: () => void; | ||
} | ||
|
||
const ChatRoom = ({ selectedChat, messages, newMessage, setNewMessage, sendMessage }:ChatRoomProps) => { | ||
|
||
|
||
return ( | ||
<S.ChatRoom> | ||
<S.ChatRoomHeader><h2>{selectedChat.chatName}</h2></S.ChatRoomHeader> | ||
<S.ChatRoomContainer> | ||
<S.OpponentMessageList> | ||
{messages.map((msg, index) => ( | ||
<p key={index}>{msg.content}</p> | ||
))} | ||
</S.OpponentMessageList> | ||
<S.MyMessageList> | ||
|
||
</S.MyMessageList> | ||
</S.ChatRoomContainer> | ||
<S.MessageInputContainer> | ||
<input | ||
type="text" | ||
value={newMessage} | ||
onChange={(e) => setNewMessage(e.target.value)} | ||
placeholder="메시지를 입력하세요" | ||
/> | ||
<button onClick={sendMessage}>전송</button> | ||
</S.MessageInputContainer> | ||
</S.ChatRoom> | ||
); | ||
}; | ||
|
||
export default ChatRoom; |
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,74 @@ | ||
import styled from "styled-components"; | ||
import {theme} from "@/styles/theme"; | ||
export const ChatRoom = styled.div` | ||
flex-grow: 1; | ||
display: flex; | ||
flex-direction: column; | ||
box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1); | ||
border-radius: 8px; | ||
background-color: ${theme.colors.gray100}; | ||
`; | ||
export const ChatRoomHeader = styled.div` | ||
height: 5%; | ||
border-bottom: 1px solid ${theme.colors.gray300}; | ||
background:${theme.colors.white}; | ||
border-radius: 0 10px; | ||
padding: 20px; | ||
` | ||
export const ChatRoomContainer = styled.div` | ||
display: flex; | ||
width: 100%; | ||
height: 100%; | ||
` | ||
export const OpponentMessageList = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
gap:60px; | ||
width: 50%; | ||
height: 100%; | ||
` | ||
export const MyMessageList = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
gap:60px; | ||
width: 50%; | ||
height: 100%; | ||
` | ||
export const ChatPlaceholder = styled.div` | ||
flex-grow: 1; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
font-size: 18px; | ||
color: #888; | ||
background-color: #f9f9f9; | ||
border-radius: 8px; | ||
`; | ||
|
||
export const MessageInputContainer = styled.div` | ||
display: flex; | ||
margin-top: 20px; | ||
input { | ||
flex: 1; | ||
padding: 10px; | ||
border: 1px solid #ccc; | ||
border-radius: 5px; | ||
margin-right: 10px; | ||
} | ||
button { | ||
padding: 10px 15px; | ||
border: none; | ||
border-radius: 5px; | ||
background-color: #007bff; | ||
color: white; | ||
cursor: pointer; | ||
&:hover { | ||
background-color: #0056b3; | ||
} | ||
} | ||
`; |
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
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
Oops, something went wrong.