diff --git a/web/src/components/DateTimeInput.tsx b/web/src/components/DateTimeInput.tsx index 0461fe2f1..8a380101c 100644 --- a/web/src/components/DateTimeInput.tsx +++ b/web/src/components/DateTimeInput.tsx @@ -1,12 +1,10 @@ -import dayjs from "dayjs"; import { isEqual } from "lodash-es"; import toast from "react-hot-toast"; import { cn } from "@/utils"; // Helper function to convert Date to local datetime string. const toLocalDateTimeString = (date: Date | undefined): string => { - if (!date) return ""; - return dayjs(date).format("YYYY-MM-DDTHH:mm:ss"); + return date?.toLocaleString() || ""; }; interface Props { @@ -20,7 +18,7 @@ const DateTimeInput: React.FC = ({ value, originalValue, onChange }) => { { - const t = useTranslate(); const location = useLocation(); const currentUser = useCurrentUser(); - const homeNavLink: NavLinkItem = { - id: "header-home", - path: Routes.ROOT, - title: t("common.home"), - icon: , - }; - const exploreNavLink: NavLinkItem = { - id: "header-explore", - path: Routes.EXPLORE, - title: t("common.explore"), - icon: , - }; - - const navLinks: NavLinkItem[] = currentUser ? [homeNavLink, exploreNavLink] : [exploreNavLink]; - useDebounce( async () => { let parent: string | undefined = undefined; @@ -65,30 +40,7 @@ const HomeSidebar = observer((props: Props) => { return (