feat: Add Slack notifications (save for later) support
This commit is contained in:
24
src/integrations/slack/preview/SlackStarPreview.tsx
Normal file
24
src/integrations/slack/preview/SlackStarPreview.tsx
Normal 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>
|
||||
}
|
||||
/>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user