Skip to content

Commit 409fe72

Browse files
committed
feat/#46: 검색하기 라우터 부착
1 parent e8a892d commit 409fe72

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

src/components/common/SearchBar.tsx

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1+
import { useNavigate } from 'react-router-dom';
12
import styled from 'styled-components';
23

34
import { CheckboxImg } from '../../assets/image';
45
import Calendar from '../main/Calendar';
56

67
const SearchBar = () => {
8+
const navigate = useNavigate();
9+
710
return (
811
<SearchBarContainer>
912
<FlightWayContainer>
@@ -35,7 +38,9 @@ const SearchBar = () => {
3538
<InfoTitle>인원, 좌석등급</InfoTitle>
3639
<InfoSeat>1명, 일반석</InfoSeat>
3740
</InfoDiv>
38-
<SearchBtn>검색하기</SearchBtn>
41+
<SearchBtn type="button" onClick={() => navigate(`/ticketList`)}>
42+
검색하기
43+
</SearchBtn>
3944
</FlightInfoContainer>
4045
</SearchBarContainer>
4146
);
@@ -141,19 +146,13 @@ const InfoDestination = styled.span`
141146
${({ theme }) => theme.fonts.heading09};
142147
`;
143148

144-
const InfoDate = styled.span`
145-
margin-right: 1.3rem;
146-
color: ${({ theme }) => theme.colors.skscanGrey900};
147-
${({ theme }) => theme.fonts.heading09};
148-
`;
149-
150149
const InfoSeat = styled.span`
151150
margin-right: 8.5rem;
152151
color: ${({ theme }) => theme.colors.skscanGrey900};
153152
${({ theme }) => theme.fonts.heading09};
154153
`;
155154

156-
const SearchBtn = styled.div`
155+
const SearchBtn = styled.button`
157156
display: flex;
158157
align-items: center;
159158
justify-content: center;

0 commit comments

Comments
 (0)