Skip to content

Commit

Permalink
feat: 페이지별 채팅 컴포넌트 추가 및 레이아웃 조정
Browse files Browse the repository at this point in the history
  • Loading branch information
gominzip committed Nov 14, 2024
1 parent ed01a97 commit 7a9d117
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 12 deletions.
5 changes: 4 additions & 1 deletion frontend/src/components/client/ClientView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ const ClientView = () => {
export default ClientView;

const ClientViewContainer = styled.main`
padding: 0 24px;
flex: 1;
overflow-y: auto;
padding: 0 60px;
background-color: ${({ theme }) => theme.tokenColors['surface-default']};
scrollbar-width: none;
`;
6 changes: 4 additions & 2 deletions frontend/src/components/client/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ const Header = () => {
export default Header;

const HeaderContainer = styled.div`
display: flex;
width: 100%;
height: 60px;
padding: 0 60px;
position: fixed;
display: flex;
background-color: ${({ theme }) => theme.tokenColors['surface-default']};
z-index: 11000;
`;
2 changes: 1 addition & 1 deletion frontend/src/components/client/Player.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import CustomPlayIcon from '@assets/custom_play_icon.svg';
import PauseIcon from '@assets/icons/pause_icon.svg';
import PlayIcon from '@assets/icons/play_icon.svg';

const Player = ({ videoUrl }: { videoUrl: string; }) => {
const Player = ({ videoUrl }: { videoUrl: string }) => {
const [onHLSReady, setOnHLSReady] = useState(false);
const [isPaused, setIsPaused] = useState(false);
const [showIcon, setShowIcon] = useState(false);
Expand Down
5 changes: 4 additions & 1 deletion frontend/src/components/host/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ export default function Header() {
}

const Container = styled.header`
width: 100%;
height: 60px;
position: fixed;
background-color: #222222;
padding: 10px 20px;
color: #fff;
font-weight: bold;
z-index: 11000;
`;
3 changes: 2 additions & 1 deletion frontend/src/components/host/Setting.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ export default function Setting() {
}

const Container = styled.main`
flex: 7;
flex: 1;
overflow-y: auto;
`;
1 change: 1 addition & 0 deletions frontend/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ body,
#root {
height: 100%;
margin: 0;
background-color: #141517;
}

body {
Expand Down
11 changes: 7 additions & 4 deletions frontend/src/pages/ClientPage.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
import styled from 'styled-components';

import { Chat, ClientView, Header } from '@components/client';
import { ClientView, Header } from '@components/client';
import { ChatRoom } from '@components/chat';

export default function ClientPage() {
return (
<>
<Header />
<ClientContainer>
<ClientView />
<Chat />
<ChatRoom />
</ClientContainer>
</>
);
}

const ClientContainer = styled.div`
box-sizing: border-box;
padding: 60px 10px 0 10px;
height: 100%;
display: flex;
justify-content: center;
background-color: ${({ theme }) => theme.tokenColors['surface-default']};
background-color: ${({ theme }) => theme.tokenColors['susrface-default']};
`;
8 changes: 6 additions & 2 deletions frontend/src/pages/HostPage.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Setting, Chat, Header } from '@components/host';
import { ChatRoom } from '@components/chat';
import { Setting, Header } from '@components/host';
import styled from 'styled-components';

export default function HostPage() {
Expand All @@ -7,12 +8,15 @@ export default function HostPage() {
<Header />
<FlexContainer>
<Setting />
<Chat />
<ChatRoom />
</FlexContainer>
</>
);
}

const FlexContainer = styled.div`
box-sizing: border-box;
height: 100%;
display: flex;
padding-top: 60px;
`;

0 comments on commit 7a9d117

Please sign in to comment.