From 17a6e37037e47c26d3c8c4eab5f49dabc8117c4e Mon Sep 17 00:00:00 2001 From: Kevin <39208150+Kvrnn@users.noreply.github.com> Date: Mon, 8 Apr 2024 01:02:01 -0700 Subject: [PATCH] comment modificiation --- src/widgets/todoist/categories/filter.jsx | 4 ++-- src/widgets/todoist/categories/label.jsx | 2 +- src/widgets/todoist/component.jsx | 4 ++-- src/widgets/todoist/event.jsx | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/widgets/todoist/categories/filter.jsx b/src/widgets/todoist/categories/filter.jsx index ec18f6ca5..8b9327ce3 100644 --- a/src/widgets/todoist/categories/filter.jsx +++ b/src/widgets/todoist/categories/filter.jsx @@ -1,6 +1,6 @@ import { useEffect, useState } from "react"; import { useTranslation } from "next-i18next"; -import { DateTime } from "luxon"; // Import Luxon for timezone conversion +import { DateTime } from "luxon"; import useWidgetAPI from "../../../utils/proxy/use-widget-api"; import Error from "../../../components/services/widget/error"; @@ -21,7 +21,7 @@ export default function Filter({ widget }) { const tasksToAdd = tasksData.slice(0, widget.maxTasks || tasksData.length).map((task) => ({ title: task.content || t("Untitled Task by Label"), date: task.due ? DateTime.fromISO(task.due.date, { zone: widget.timeZone }).toJSDate() : null, - color: widget.color || task.color || "blue", // Adjust color based on your preference + color: widget.color || task.color || "blue", description: task.tags ? task.tags.join(", ") : "", url: task.url, id: task.id, diff --git a/src/widgets/todoist/categories/label.jsx b/src/widgets/todoist/categories/label.jsx index 7b066b273..f7e902bff 100644 --- a/src/widgets/todoist/categories/label.jsx +++ b/src/widgets/todoist/categories/label.jsx @@ -21,7 +21,7 @@ export default function Label({ widget }) { const tasksToAdd = tasksData.slice(0, widget.maxTasks || tasksData.length).map((task) => ({ title: task.content || t("Untitled Task by Label"), date: task.due ? DateTime.fromISO(task.due.date, { zone: widget.timeZone }).toJSDate() : null, - color: widget.color || task.color || "blue", // Adjust color based on your preference + color: widget.color || task.color || "blue", description: task.tags ? task.tags.join(", ") : "", url: task.url, id: task.id, diff --git a/src/widgets/todoist/component.jsx b/src/widgets/todoist/component.jsx index 722739a86..5b97a1776 100644 --- a/src/widgets/todoist/component.jsx +++ b/src/widgets/todoist/component.jsx @@ -2,7 +2,7 @@ import { useMemo } from "react"; import dynamic from "next/dynamic"; import Container from "components/services/widget/container"; -import Block from "components/services/widget/block"; // Assuming this component renders the category name as a block-level element +import Block from "components/services/widget/block"; export default function Component({ service }) { const { widget } = service; @@ -15,7 +15,7 @@ export default function Component({ service }) { .map((category) => ({ service: dynamic(() => import(`./categories/${category.sort}`)), widget: { ...widget, ...category }, - categoryName: category.category_name, // Add categoryName property + categoryName: category.category_name, })) ?? [], [widget] ); diff --git a/src/widgets/todoist/event.jsx b/src/widgets/todoist/event.jsx index c90024e0f..b5136f07a 100644 --- a/src/widgets/todoist/event.jsx +++ b/src/widgets/todoist/event.jsx @@ -27,8 +27,8 @@ export default function Event({ task, colorVariants }) { return (
setHover(true)} // Change to setHover(true) and setHover(false) - onMouseLeave={() => setHover(false)} // Change to setHover(false) + onMouseEnter={() => setHover(true)} + onMouseLeave={() => setHover(false)} key={`task-${task.id}`} >