From 88bff9010d854eb2128acdd5fe9700168ba0ac17 Mon Sep 17 00:00:00 2001 From: Vansh Chopra <76000026+vanshavenger@users.noreply.github.com> Date: Tue, 12 Nov 2024 14:02:08 +0530 Subject: [PATCH] fix: small minor errors (#1504) * FIX: Map keys error * FIX: Duplicate key error * FIx: Animate presewnce where it is needed --- src/components/BreadCrumbComponent.tsx | 6 ++-- src/components/Navbar.tsx | 44 ++++++++++++-------------- 2 files changed, 24 insertions(+), 26 deletions(-) diff --git a/src/components/BreadCrumbComponent.tsx b/src/components/BreadCrumbComponent.tsx index 79b85842e..3dd3753e9 100644 --- a/src/components/BreadCrumbComponent.tsx +++ b/src/components/BreadCrumbComponent.tsx @@ -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, @@ -93,7 +93,7 @@ export default function BreadCrumbComponent({ finalRouteArray = [...rest]; } return ( - <> + {index !== array.length - 1 ? ( <> @@ -116,7 +116,7 @@ export default function BreadCrumbComponent({ )} - + ); })} diff --git a/src/components/Navbar.tsx b/src/components/Navbar.tsx index bc0bb781a..052a855c5 100644 --- a/src/components/Navbar.tsx +++ b/src/components/Navbar.tsx @@ -41,7 +41,7 @@ export const Navbar = () => { ); return ( - + <> { {/* Mobile menu */} - {!session?.user && ( - <> - {isMenuOpen && ( + + {!session?.user && isMenuOpen && ( + - - + - + target="_blank" + > + Join now + + - )} - - )} + + )} + {/* Mobile search overlay */} @@ -195,6 +193,6 @@ export const Navbar = () => { )} - + ); };