diff --git a/src/widgets/todoist/categories/label.jsx b/src/widgets/todoist/categories/label.jsx index bffe9dd2a..7b066b273 100644 --- a/src/widgets/todoist/categories/label.jsx +++ b/src/widgets/todoist/categories/label.jsx @@ -1,10 +1,10 @@ import { useEffect, useState } from "react"; import { useTranslation } from "next-i18next"; +import { DateTime } from "luxon"; import useWidgetAPI from "../../../utils/proxy/use-widget-api"; import Error from "../../../components/services/widget/error"; import Agenda from "../agenda"; -import { DateTime } from "luxon"; export default function Label({ widget }) { const { t } = useTranslation(); diff --git a/src/widgets/todoist/categories/project.jsx b/src/widgets/todoist/categories/project.jsx index f98c8959f..e4f4f321e 100644 --- a/src/widgets/todoist/categories/project.jsx +++ b/src/widgets/todoist/categories/project.jsx @@ -1,10 +1,11 @@ import { useEffect, useState } from "react"; import { useTranslation } from "next-i18next"; +import { DateTime } from "luxon"; import useWidgetAPI from "../../../utils/proxy/use-widget-api"; import Error from "../../../components/services/widget/error"; import Agenda from "../agenda"; -import { DateTime } from "luxon"; + export default function Project({ widget }) { const { t } = useTranslation(); @@ -32,7 +33,7 @@ export default function Project({ widget }) { } // Find the project with the given name - const project = projectsData.find((project) => project.name === widget.project_name); + const project = projectsData.find((index) => index.name === widget.project_name); // Check if project exists if (!project) { @@ -83,7 +84,7 @@ export default function Project({ widget }) { } // Find the project with the given name - const project = projectsData.find((project) => project.name === widget.project_name); + const project = projectsData.find((index) => index.name === widget.project_name); // If project does not exist, display error component if (!project) { diff --git a/src/widgets/todoist/event.jsx b/src/widgets/todoist/event.jsx index 0a8756848..c90024e0f 100644 --- a/src/widgets/todoist/event.jsx +++ b/src/widgets/todoist/event.jsx @@ -1,12 +1,10 @@ import { useState } from "react"; -import { useTranslation } from "next-i18next"; import { DateTime } from "luxon"; import classNames from "classnames"; import { IoMdCheckmarkCircleOutline } from "react-icons/io"; export default function Event({ task, colorVariants }) { const [hover, setHover] = useState(false); - const { i18n } = useTranslation(); // Ensure you're getting 't' from useTranslation() const renderEventTitle = () => { if (task.url) {