import React from "react"; import useSWR from "swr"; // headless ui import { Dialog, Transition } from "@headlessui/react"; // services import { WorkspaceService } from "services/workspace.service"; // components import { MarkdownRenderer } from "components/ui"; import { Loader } from "@plane/ui"; // icons import { X } from "lucide-react"; // helpers import { renderLongDateFormat } from "helpers/date-time.helper"; type Props = { isOpen: boolean; setIsOpen: React.Dispatch>; }; // services const workspaceService = new WorkspaceService(); export const ProductUpdatesModal: React.FC = ({ isOpen, setIsOpen }) => { const { data: updates } = useSWR("PRODUCT_UPDATES", () => workspaceService.getProductUpdates()); return (
Product Updates {updates && updates.length > 0 ? (
{updates.map((item, index) => (
{item.tag_name} {renderLongDateFormat(item.published_at)} {index === 0 && ( New )}
))}
) : (
)}
); };