feat: Add Linear notification list item

This commit is contained in:
2024-01-26 21:22:47 +01:00
parent 0507722ecf
commit 3df827ebd7
17 changed files with 383 additions and 41 deletions

View File

@@ -0,0 +1,26 @@
import { Notification, getNotificationHtmlUrl } from "../../../notification";
import { Detail, ActionPanel, Action } from "@raycast/api";
import { LinearProject } from "../types";
import { useMemo } from "react";
interface LinearProjectPreviewProps {
notification: Notification;
linearProject: LinearProject;
}
export function LinearProjectPreview({ notification, linearProject }: LinearProjectPreviewProps) {
const notification_html_url = useMemo(() => {
return getNotificationHtmlUrl(notification);
}, [notification]);
return (
<Detail
markdown={`# ${linearProject.name}`}
actions={
<ActionPanel>
<Action.OpenInBrowser url={notification_html_url} />
</ActionPanel>
}
/>
);
}