Skip to content

Commit

Permalink
Merge pull request #90 from Qfeed-Dev/feature/#35
Browse files Browse the repository at this point in the history
[Feat] bottom nav, header 수정
  • Loading branch information
hamo-o authored Sep 28, 2023
2 parents b8e2632 + bc87689 commit 0d4a2da
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 24 deletions.
27 changes: 11 additions & 16 deletions src/components/BottomNavigation/BottomNavigation.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"use client";
import Link from "next/link";
import { useRouter, usePathname } from "next/navigation";
import { colors } from "styles/theme";
import { Route } from "src/constants/Route";
Expand All @@ -15,11 +16,7 @@ const BottomNavigation = ({}: Props) => {
return (
<BottomNavigationWrapper>
<BottomNavigationInner>
<NavIconWrapper
onClick={() => {
router.push(Route.HOME());
}}
>
<NavIconWrapper href={"/"}>
<Icon
icon="BHome"
width={24}
Expand All @@ -39,23 +36,15 @@ const BottomNavigation = ({}: Props) => {
selected={Boolean(pathname.match("/((chat).*)"))}
/>
</NavIconWrapper> */}
<NavIconWrapper
onClick={() => {
router.push(Route.FRIEND());
}}
>
<NavIconWrapper href={"/friend"}>
<Icon
icon="BSearch"
width={24}
height={24}
selected={Boolean(pathname.match("/((friend).*)"))}
/>
</NavIconWrapper>
<NavIconWrapper
onClick={() => {
router.push(Route.MYPAGE());
}}
>
<NavIconWrapper href={"mypage"}>
<Icon
icon="BMypage"
width={24}
Expand Down Expand Up @@ -92,6 +81,12 @@ const BottomNavigationInner = styled.div`
border-top: 1px solid ${colors.light_qwhite};
`;

const NavIconWrapper = styled(Flex)``;
const NavIconWrapper = styled(Link)`
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
`;

export default BottomNavigation;
9 changes: 1 addition & 8 deletions src/pages-edit/home/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,7 @@ export default function Home() {
<></>
) : (
<Flex direction="column" gap={16}>
<NavigationTop
leftIcon={
<Profile
width={46}
onClick={() => router.push("/mypage")}
/>
}
/>
<NavigationTop />
<Flex direction="column" gap={16}>
{user.user && (
<CheckOfficial
Expand Down

0 comments on commit 0d4a2da

Please sign in to comment.