feat: Add Slack notifications (save for later) support

This commit is contained in:
2024-03-13 08:36:53 +01:00
parent 8a7eda4f3c
commit 751ee38d32
7 changed files with 606 additions and 3 deletions

View File

@@ -0,0 +1,24 @@
import { Notification, getNotificationHtmlUrl } from "../../../notification";
import { Detail, ActionPanel, Action } from "@raycast/api";
import { useMemo } from "react";
interface SlackStarPreviewProps {
notification: Notification;
}
export function SlackStarPreview({ notification }: SlackStarPreviewProps) {
const notificationHtmlUrl = useMemo(() => {
return getNotificationHtmlUrl(notification);
}, [notification]);
return (
<Detail
markdown={`# ${notification.title}`}
actions={
<ActionPanel>
<Action.OpenInBrowser url={notificationHtmlUrl} />
</ActionPanel>
}
/>
);
}