diff --git a/src/app/(main)/dashboard/components/Calendar/Calendar.logic.ts b/src/app/(main)/dashboard/components/Calendar/Calendar.logic.ts index 2a67d1b7..275fb49f 100644 --- a/src/app/(main)/dashboard/components/Calendar/Calendar.logic.ts +++ b/src/app/(main)/dashboard/components/Calendar/Calendar.logic.ts @@ -195,6 +195,7 @@ export const useCalendarLogic = ( check: sprintsData?.some((day) => isSameDay(new Date(day.endDate), date)), label: "Weekly Check-in Due", link: weeklyCheckInLink(), + isDisabled: isBefore(date, new Date()), }, { id: 3, diff --git a/src/app/(main)/dashboard/components/Calendar/Calendar.tsx b/src/app/(main)/dashboard/components/Calendar/Calendar.tsx index a1efe389..3a5a5e59 100644 --- a/src/app/(main)/dashboard/components/Calendar/Calendar.tsx +++ b/src/app/(main)/dashboard/components/Calendar/Calendar.tsx @@ -176,6 +176,7 @@ export default function Calendar({ title={condition.label} link={condition?.link} useTargetBlank={false} + isDisabled={condition?.isDisabled} /> ) : null, diff --git a/src/app/(main)/dashboard/components/Calendar/components/SprintItem.tsx b/src/app/(main)/dashboard/components/Calendar/components/SprintItem.tsx index 719dd994..2b9800ea 100644 --- a/src/app/(main)/dashboard/components/Calendar/components/SprintItem.tsx +++ b/src/app/(main)/dashboard/components/Calendar/components/SprintItem.tsx @@ -7,25 +7,43 @@ type SprintItemProps = { link: string; time?: string; useTargetBlank?: boolean; + isDisabled?: boolean; }; function SprintItem({ title, link, time, useTargetBlank = true, + isDisabled = false, }: SprintItemProps) { return ( - + isDisabled && e.preventDefault()} + >
{time ? ( - + ) : null} -

+

{title}

- +
); diff --git a/src/app/(main)/my-voyage/[teamId]/ideation/components/IdeationComponentWrapper.tsx b/src/app/(main)/my-voyage/[teamId]/ideation/components/IdeationComponentWrapper.tsx index 3b915bba..afe67bc7 100644 --- a/src/app/(main)/my-voyage/[teamId]/ideation/components/IdeationComponentWrapper.tsx +++ b/src/app/(main)/my-voyage/[teamId]/ideation/components/IdeationComponentWrapper.tsx @@ -1,21 +1,22 @@ import { redirect } from "next/navigation"; +import ContributionCard from "./ContributionCard"; +import CreateIdeationContainer from "./CreateIdeationContainer"; +import FinalizedIdeationCard from "./FinalizedIdeationCard"; import IdeationContainer from "./IdeationContainer"; import IdeationProvider from "./IdeationProvider"; -import CreateIdeationContainer from "./CreateIdeationContainer"; -import ContributionCard from "./ContributionCard"; import VoteCard from "./VoteCard"; -import FinalizedIdeationCard from "./FinalizedIdeationCard"; import { type FetchIdeationsProps } from "@/app/(main)/my-voyage/[teamId]/ideation/ideationService"; -import { type IdeationData } from "@/store/features/ideation/ideationSlice"; -import { getAccessToken } from "@/utils/getCookie"; -import { GET } from "@/utils/requests"; import Banner from "@/components/banner/Banner"; -import { type AsyncActionResponse, handleAsync } from "@/utils/handleAsync"; -import { CacheTag } from "@/utils/cacheTag"; import VoyagePageBannerContainer from "@/components/banner/VoyagePageBannerContainer"; +import { type IdeationData } from "@/store/features/ideation/ideationSlice"; +import { CacheTag } from "@/utils/cacheTag"; +import { getAccessToken } from "@/utils/getCookie"; import { getCurrentVoyageData } from "@/utils/getCurrentVoyageData"; -import routePaths from "@/utils/routePaths"; import { getUser } from "@/utils/getUser"; +import { handleAsync, type AsyncActionResponse } from "@/utils/handleAsync"; +import { GET } from "@/utils/requests"; +import routePaths from "@/utils/routePaths"; + // import { ideation } from "./fixtures/ideation"; // If user is not logged in, nav should be updated to reflect signed out state @@ -99,63 +100,63 @@ export default async function IdeationComponentWrapper({ ); } - if (projectIdeas.length === 0) { - return ( -
-
-

- Be the First to Share! -

-

- It looks like no one has posted anything yet, but don’t worry, you - can be the first to create a new project idea and vision for your - team! -

-

- Click on the{" "} - - Add Project Idea - {" "} - button at the top to get started! -

-
- -
- ); - } - return ( <> - - {projectIdeas.map((projectIdea) => ( - + +
+
+

+ Be the First to Share! +

+

+ It looks like no one has posted anything yet, but don’t worry, + you can be the first to create a new project idea and vision + for your team! +

+

+ Click on the{" "} + + Add Project Idea + {" "} + button at the top to get started! +

+
+ - } - secondChild={ - - } - /> - ))} +
+ + ) : ( + projectIdeas.map((projectIdea) => ( + + } + secondChild={ + + } + /> + )) + )} ); }