Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,6 @@ jspm_packages/

# TernJS port file
.tern-port

# Temporary debug files
debug_temp.js
6 changes: 3 additions & 3 deletions components/MegaMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const MegaMenu: React.FC<MegaMenuProps> = ({
}, [isOpen, handleKeyDown]);

// Early return with validation
if (!isOpen || !position || !content?.items?.length) {
if (!isOpen || !content?.items?.length) {
return null;
}

Expand Down Expand Up @@ -118,7 +118,7 @@ const MegaMenu: React.FC<MegaMenuProps> = ({

return (
<AnimatePresence>
{isOpen && position && (
{isOpen && (
<motion.div
initial={{ opacity: 0, y: -10 }}
animate={{ opacity: 1, y: 0 }}
Expand All @@ -128,7 +128,7 @@ const MegaMenu: React.FC<MegaMenuProps> = ({
style={{
width: '100vw',
height: `${calculateHeight}px`, // Dynamic height
top: `${position.top}px`,
top: position ? `${position.top}px` : '80px', // Fallback to header height if position not calculated yet
left: '0px',
}}
role="dialog"
Expand Down