diff --git a/web/components/core/filters/date-filter-modal.tsx b/web/components/core/filters/date-filter-modal.tsx index 3d7e78ba1..d1eedc749 100644 --- a/web/components/core/filters/date-filter-modal.tsx +++ b/web/components/core/filters/date-filter-modal.tsx @@ -44,7 +44,10 @@ export const DateFilterModal: React.FC = ({ title, handleClose, isOpen, o handleClose(); }; - const isInvalid = watch("filterType") === "range" ? new Date(watch("date1")) > new Date(watch("date2")) : false; + const date1 = watch("date1"); + const date2 = watch("date2"); + + const isInvalid = watch("filterType") === "range" ? new Date(date1) > new Date(date2) : false; return ( @@ -91,7 +94,10 @@ export const DateFilterModal: React.FC = ({ title, handleClose, isOpen, o onChange(date)} + onSelect={(date) => { + if (!date) return; + onChange(date); + }} mode="single" disabled={[{ after: new Date(watch("date2")) }]} className="border border-custom-border-200 p-3 rounded-md" @@ -106,7 +112,10 @@ export const DateFilterModal: React.FC = ({ title, handleClose, isOpen, o onChange(date)} + onSelect={(date) => { + if (!date) return; + onChange(date); + }} mode="single" disabled={[{ before: new Date(watch("date1")) }]} className="border border-custom-border-200 p-3 rounded-md" diff --git a/web/components/empty-state/empty-state.tsx b/web/components/empty-state/empty-state.tsx index 9ef216068..a9ff4decd 100644 --- a/web/components/empty-state/empty-state.tsx +++ b/web/components/empty-state/empty-state.tsx @@ -39,6 +39,10 @@ export const EmptyState: React.FC = (props) => { } = useUser(); // theme const { resolvedTheme } = useTheme(); + + // if empty state type is not found + if (!EMPTY_STATE_DETAILS[type]) return null; + // current empty state details const { key, title, description, path, primaryButton, secondaryButton, accessType, access } = EMPTY_STATE_DETAILS[type]; diff --git a/web/components/workspace/sidebar-menu.tsx b/web/components/workspace/sidebar-menu.tsx index 2069d8f27..2da7cd406 100644 --- a/web/components/workspace/sidebar-menu.tsx +++ b/web/components/workspace/sidebar-menu.tsx @@ -65,7 +65,7 @@ export const WorkspaceSidebarMenu = observer(() => { })} /> } - {!themeStore?.sidebarCollapsed && link.label} +

{!themeStore?.sidebarCollapsed && link.label}

{!themeStore?.sidebarCollapsed && link.key === "active-cycles" && ( )} diff --git a/web/constants/dashboard.ts b/web/constants/dashboard.ts index 3d99a4679..58985935f 100644 --- a/web/constants/dashboard.ts +++ b/web/constants/dashboard.ts @@ -1,6 +1,6 @@ import { linearGradientDef } from "@nivo/core"; // assets -import { BarChart2, Briefcase, CheckCircle, LayoutGrid } from "lucide-react"; +import { BarChart2, Briefcase, CheckCircle, Home } from "lucide-react"; import { ContrastIcon } from "@plane/ui"; import { Props } from "components/icons/types"; import CompletedIssuesDark from "public/empty-state/dashboard/dark/completed-issues.svg"; @@ -257,12 +257,12 @@ export const SIDEBAR_MENU_ITEMS: { Icon: React.FC; }[] = [ { - key: "dashboard", - label: "Dashboard", + key: "home", + label: "Home", href: ``, access: EUserWorkspaceRoles.GUEST, highlight: (pathname: string, baseUrl: string) => pathname === `${baseUrl}`, - Icon: LayoutGrid, + Icon: Home, }, { key: "analytics", diff --git a/web/constants/empty-state.ts b/web/constants/empty-state.ts index 38f334b20..3e72ef5a6 100644 --- a/web/constants/empty-state.ts +++ b/web/constants/empty-state.ts @@ -69,7 +69,7 @@ export enum EmptyStateType { PROJECT_VIEW = "project-view", PROJECT_PAGE = "project-page", PROJECT_PAGE_ALL = "project-page-all", - PROJECT_PAGE_FAVORITE = "project-page-favorite", + PROJECT_PAGE_FAVORITE = "project-page-favorites", PROJECT_PAGE_PRIVATE = "project-page-private", PROJECT_PAGE_SHARED = "project-page-shared", PROJECT_PAGE_ARCHIVED = "project-page-archived", @@ -475,8 +475,8 @@ const emptyStateDetails = { "Pages help you organise your thoughts to create wikis, discussions or even document heated takes for your project. Use it wisely!", path: "/empty-state/pages/all", }, - "project-page-favorite": { - key: "project-page-favorite", + "project-page-favorites": { + key: "project-page-favorites", title: "No favorite pages yet", description: "Favorites for quick access? mark them and find them right here.", path: "/empty-state/pages/favorites",