Skip to content

Commit

Permalink
feat: visit페이지에 홈으로 가는 버튼 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
5nxtnxtnxt committed Dec 13, 2023
1 parent 68b5258 commit 82e0222
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions front/src/pages/Visit/VisitHeader.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { useContext } from 'react';
import { useNavigate } from 'react-router-dom';
import styled from 'styled-components';
import { Container } from '@utils';
import { HeaderText } from '@components';
Expand All @@ -19,12 +20,24 @@ const StyledLetterImg = styled.img`
height: 100%;
`;

const HomeBtn = styled.img`
position: fixed;
z-index: 99;
top: 1rem;
left: 0.2rem;
width: 2.5rem;
height: 2.5rem;
filter: invert(1);
`;

const VisitHeader = () => {
const { userData } = useContext(SnowBallContext);
const { messageList } = useContext(MessageListContext);
const navigate = useNavigate();

return (
<Container>
<HomeBtn onClick={() => navigate('/')} src="/icons/home.svg" />
<HeaderText Ref={null} userName={userData.nickname} />
<StyledLetter>
<StyledLetterImg src={'/icons/letter.svg'} />
Expand Down

0 comments on commit 82e0222

Please sign in to comment.