+
- {open &&
setOpen(false)} />}
+ {open && (
+ e.stopPropagation()}
+ >
+ setOpen(false)} />
+
+ )}
);
};
diff --git a/src/components/NavigationBar/index.test.tsx b/src/components/NavigationBar/index.test.tsx
index 85d82b99..5668d92d 100644
--- a/src/components/NavigationBar/index.test.tsx
+++ b/src/components/NavigationBar/index.test.tsx
@@ -1,3 +1,4 @@
+import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { fireEvent, render, screen } from "@testing-library/react";
import { useRouter } from "next/navigation";
import type { ComponentProps, ReactElement } from "react";
@@ -35,6 +36,11 @@ jest.mock("@/components/common/LogoutButton", () => ({
default: () => null,
}));
+jest.mock("@/components/NavigationBar/NotificationPopover", () => ({
+ __esModule: true,
+ default: () => null,
+}));
+
jest.mock("@/components/common/Icon", () => ({
Icon: ({ name }: { name: string }) =>
,
}));
@@ -47,6 +53,7 @@ function renderWithNavContext(
ui: ReactElement,
value: Partial
= {},
) {
+ const queryClient = new QueryClient();
const defaults: ContextValue = {
isOpen: true,
open: jest.fn(),
@@ -57,9 +64,11 @@ function renderWithNavContext(
};
return render(
-
- {ui}
- ,
+
+
+ {ui}
+
+ ,
);
}
diff --git a/src/components/NavigationBar/index.tsx b/src/components/NavigationBar/index.tsx
index 772117cb..052caca9 100644
--- a/src/components/NavigationBar/index.tsx
+++ b/src/components/NavigationBar/index.tsx
@@ -34,7 +34,8 @@ const navigationBarAsideVariants = cva(
variants: {
open: {
true: "h-screen overflow-y-scroll mobile:w-[360px] mobile:p-8",
- false: "h-[56px] mobile:w-[60px] mobile:px-3 mobile:py-8",
+ false:
+ "h-[56px] mobile:w-[60px] mobile:px-3 mobile:py-8 gap-6 items-center",
},
},
defaultVariants: { open: false },
@@ -53,7 +54,7 @@ export const NavigationBar = () => {
style={{ willChange: "width, height", zIndex: NAVIGATION_BAR_ZINDEX }}
>
- {/* */}
+ {!isOpen && }
{
-
+
+
+
diff --git a/src/components/home/FavoriteGoalsItem.tsx b/src/components/home/FavoriteGoalsItem.tsx
index 8b76044f..c04d28f3 100644
--- a/src/components/home/FavoriteGoalsItem.tsx
+++ b/src/components/home/FavoriteGoalsItem.tsx
@@ -8,6 +8,8 @@ export interface FavoriteGoalsItemProps {
goal: {
goalId: number;
goalName: string;
+ progressPercent: number;
+ isFavorite: boolean;
};
}
@@ -25,9 +27,9 @@ export function FavoriteGoalsItem({
teamId={String(teamId)}
goalId={goal.goalId}
title={goal.goalName}
- progress={0}
+ progress={goal.progressPercent}
color="green"
- isFavorite={false}
+ isFavorite={goal.isFavorite}
className="w-full shrink-0 bg-green-100"
/>