diff --git a/nextjs/src/app/course/[courseName]/calendar/day/ItemInDay.tsx b/nextjs/src/app/course/[courseName]/calendar/day/ItemInDay.tsx
index 9d49616..ea380b8 100644
--- a/nextjs/src/app/course/[courseName]/calendar/day/ItemInDay.tsx
+++ b/nextjs/src/app/course/[courseName]/calendar/day/ItemInDay.tsx
@@ -64,21 +64,6 @@ export function ItemInDay({
targetRef={linkRef}
visible={tooltipVisible && status === "incomplete"}
/>
- {/* {status === "incomplete" && (
-
- {message}
-
- )} */}
);
}
@@ -91,17 +76,15 @@ const Tooltip: React.FC<{
const [position, setPosition] = useState({ top: 0, left: 0 });
useEffect(() => {
- if (targetRef.current && visible) {
+ if (targetRef.current) {
const rect = targetRef.current.getBoundingClientRect();
- // Calculate tooltip position relative to the target
setPosition({
- top: rect.bottom + window.scrollY + 10, // Adjust based on your needs
- left: rect.left + window.scrollX + rect.width / 2, // Center tooltip
+ top: rect.bottom + window.scrollY + 10,
+ left: rect.left + window.scrollX + rect.width / 2,
});
}
- }, [targetRef, visible]);
+ }, [targetRef]);
- // if (!visible) return null;
return createPortal(
{message}
,
- document.body // Render outside of overflow-hidden parent
+ document.body
);
};