import React from "react"; import useSWR from "swr"; // headless ui import { X } from "lucide-react"; import { Dialog, Transition } from "@headlessui/react"; // services // components import { Loader } from "@plane/ui"; import { MarkdownRenderer } from "@/components/ui"; // icons // helpers import { renderFormattedDate } from "@/helpers/date-time.helper"; import { WorkspaceService } from "@/services/workspace.service"; 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} {renderFormattedDate(item.published_at)} {index === 0 && ( New )}
))}
) : (
)}
); };