Skip to content

Commit

Permalink
Merge pull request #66 from pobu-team/develop
Browse files Browse the repository at this point in the history
💄 Style: GNB 디자인 변경사항 적용
  • Loading branch information
ckhe1215 authored Nov 5, 2023
2 parents 433e289 + 8363d62 commit 8173dea
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 20 deletions.
1 change: 1 addition & 0 deletions src/components/footer/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const ButtonContainer = styled.div<{ active: boolean}>`
img {
display: flex;
margin-bottom: 4px;
}
}
`;
Expand Down
40 changes: 21 additions & 19 deletions src/components/footer/NavigationBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,39 +23,41 @@ export default function NavigationBar() {
const searchActive = pathname === '/search';
const myPageActive = MYPAGES.includes(pathname);

const handleHomeButton = () => {
navigate('/main');
addGaEvent('GNB Home');
};

const handleMyPageClick = () => {
navigate('/mypage');
addGaEvent('GNB My Page');
};

const handleClickSearchButton = () => {
navigate('/search');
addGaEvent('GNB Search');
const handleNavClick = (location: string, eventName:string) => {
navigate(location);
addGaEvent(eventName);
};

return (
<Container>
<Button
text="홈"
imgSrc={homeActive ? 'home_active' : 'home_disable'}
onClickFunc={handleHomeButton}
onClickFunc={() => handleNavClick('/main', 'GNB Home')}
active={homeActive}
/>
<Button
text="검색"
imgSrc="search_default"
onClickFunc={handleClickSearchButton}
text="매장찾기"
imgSrc="shop_search"
onClickFunc={() => handleNavClick('/search', 'GNB Search')}
active={searchActive}
/>
<Button
text="포즈추천"
imgSrc="recommend"
onClickFunc={() => handleNavClick('/people', 'GNB Home')}
active={searchActive}
/>
<Button
text="포즈등록"
imgSrc="register"
onClickFunc={() => handleNavClick('/register', 'GNB Home')}
active={searchActive}
/>
<Button
text="마이페이지"
text="마이"
imgSrc={myPageActive ? 'mypage_active' : 'mypage_disable'}
onClickFunc={handleMyPageClick}
onClickFunc={() => handleNavClick('/mypage', 'GNB My Page')}
active={myPageActive}
/>
</Container>
Expand Down
1 change: 0 additions & 1 deletion src/components/main/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ export default function Main() {
<PoseContainerTitle title="최근 올라온 포즈에요" />
<PoseList poses={recentRandomPoses} likePoseIdArr={likePoseIdArr} />
</PoseListContainer>
<Floating />
{isLogInModalShowing && <LoginModal />}
</div>
);
Expand Down
10 changes: 10 additions & 0 deletions static/images/recommend_D.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions static/images/register_D.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions static/images/shop_search_D.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8173dea

Please sign in to comment.