From 9fb687d8f453e41982612561c9ad2e8622536588 Mon Sep 17 00:00:00 2001 From: Usama Tariq Date: Tue, 21 Jan 2025 13:29:50 +0500 Subject: [PATCH] build fix --- src/app/(home)/page.tsx | 2 +- src/components/TagsInput/TagsInput.tsx | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/app/(home)/page.tsx b/src/app/(home)/page.tsx index 6e5c2cf..1c41c21 100644 --- a/src/app/(home)/page.tsx +++ b/src/app/(home)/page.tsx @@ -5,9 +5,9 @@ import { Carousel, CarouselContent, CarouselItem } from "@/src/components/ui/car import SkillTag from "@/src/components/HomePageComponents/SkillTag/SkillTag"; import MentorCard from "@/src/components/HomePageComponents/MentorCard/MentorCard"; import SessionCard from '@/src/components/HomePageComponents/SessionCard/SessionCard'; -import Container from '@/src/components/Container/Container'; import StatCardList from '@/src/components/StatCard/StatCardList'; import MissionCardList from '@/src/components/MissionCard/MissionCardList'; +import Container from '@/src/components/container/Container'; export default function Home() { diff --git a/src/components/TagsInput/TagsInput.tsx b/src/components/TagsInput/TagsInput.tsx index 942d6f6..038e33b 100644 --- a/src/components/TagsInput/TagsInput.tsx +++ b/src/components/TagsInput/TagsInput.tsx @@ -148,9 +148,12 @@ const TagsInput: React.FC = ({ } } } else if (e.key === "ArrowDown") { - suggestions.length - ? setSelectedSuggestionIndex((prev) => (prev + 1) % suggestions.length) - : setSelectNewTag(true) + if(suggestions.length){ + setSelectedSuggestionIndex((prev) => (prev + 1) % suggestions.length) + }else{ + setSelectNewTag(true) + } + } else if (e.key === "ArrowUp") { if (suggestions.length) { setSelectedSuggestionIndex(