feat: Add Todoist notification list item
This commit is contained in:
24
src/integrations/todoist/preview/TodoistTaskPreview.tsx
Normal file
24
src/integrations/todoist/preview/TodoistTaskPreview.tsx
Normal file
@@ -0,0 +1,24 @@
|
||||
import { Notification, getNotificationHtmlUrl } from "../../../notification";
|
||||
import { Detail, ActionPanel, Action } from "@raycast/api";
|
||||
import { useMemo } from "react";
|
||||
|
||||
interface TodoistTaskPreviewProps {
|
||||
notification: Notification;
|
||||
}
|
||||
|
||||
export function TodoistTaskPreview({ notification }: TodoistTaskPreviewProps) {
|
||||
const notificationHtmlUrl = useMemo(() => {
|
||||
return getNotificationHtmlUrl(notification);
|
||||
}, [notification]);
|
||||
|
||||
return (
|
||||
<Detail
|
||||
markdown={`# ${notification.title}`}
|
||||
actions={
|
||||
<ActionPanel>
|
||||
<Action.OpenInBrowser url={notificationHtmlUrl} />
|
||||
</ActionPanel>
|
||||
}
|
||||
/>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user