Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: Map keys error #1504

Merged
merged 3 commits into from
Nov 12, 2024
Merged
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
6 changes: 3 additions & 3 deletions src/components/BreadCrumbComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
import { FullCourseContent } from '@/db/course';
import { Home } from 'lucide-react';
import Link from 'next/link';
import { useMemo } from 'react';
import { Fragment, useMemo } from 'react';

export default function BreadCrumbComponent({
rest,
Expand Down Expand Up @@ -93,7 +93,7 @@ export default function BreadCrumbComponent({
finalRouteArray = [...rest];
}
return (
<>
<Fragment key={indexofBreadCrumbId}>
{index !== array.length - 1 ? (
<>
<BreadcrumbItem>
Expand All @@ -116,7 +116,7 @@ export default function BreadCrumbComponent({
</BreadcrumbPage>
</BreadcrumbItem>
)}
</>
</Fragment>
);
})}
</BreadcrumbList>
Expand Down
44 changes: 21 additions & 23 deletions src/components/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const Navbar = () => {
);

return (
<AnimatePresence>
<>
<motion.nav
initial={{ opacity: 0, y: -20 }}
animate={{ opacity: 1, y: 0 }}
Expand Down Expand Up @@ -143,35 +143,33 @@ export const Navbar = () => {
</div>

{/* Mobile menu */}
{!session?.user && (
<>
{isMenuOpen && (
<AnimatePresence>
{!session?.user && isMenuOpen && (
<motion.div
className="bg-background p-4 md:hidden"
initial={{ opacity: 0, y: -20 }}
animate={{ opacity: 1, y: 0 }}
exit={{ opacity: 0, y: -20 }}
>
<motion.div
className="bg-background p-4 md:hidden"
className="flex gap-2"
initial={{ opacity: 0, y: -20 }}
animate={{ opacity: 1, y: 0 }}
exit={{ opacity: 0, y: -20 }}
>
<motion.div
className="flex gap-2"
initial={{ opacity: 0, y: -20 }}
animate={{ opacity: 1, y: 0 }}
exit={{ opacity: 0, y: -20 }}
>
<AppbarAuth />
<AppbarAuth />
<Button variant={'branding'} className="w-full">
<Link
<Link
href={'https://harkirat.classx.co.in/new-courses'}
target="_blank"
>
Join now
</Link>
</Button>
</motion.div>
target="_blank"
>
Join now
</Link>
</Button>
</motion.div>
)}
</>
)}
</motion.div>
)}
</AnimatePresence>
</motion.nav>

{/* Mobile search overlay */}
Expand All @@ -195,6 +193,6 @@ export const Navbar = () => {
</motion.div>
)}
</AnimatePresence>
</AnimatePresence>
</>
);
};
Loading