feat: Add Linear notification list item
This commit is contained in:
26
src/integrations/linear/preview/LinearProjectPreview.tsx
Normal file
26
src/integrations/linear/preview/LinearProjectPreview.tsx
Normal 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>
|
||||
}
|
||||
/>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user