feat: Add support for Slack reaction and message notifications
This commit is contained in:
26
src/integrations/slack/preview/SlackReactionPreview.tsx
Normal file
26
src/integrations/slack/preview/SlackReactionPreview.tsx
Normal file
@@ -0,0 +1,26 @@
|
||||
import { getNotificationHtmlUrl, Notification } from "../../../notification";
|
||||
import { Detail, ActionPanel, Action } from "@raycast/api";
|
||||
import { SlackReaction } from "../types";
|
||||
import { useMemo } from "react";
|
||||
|
||||
interface SlackReactionPreviewProps {
|
||||
notification: Notification;
|
||||
slack_reaction: SlackReaction;
|
||||
}
|
||||
|
||||
export function SlackReactionPreview({ notification }: SlackReactionPreviewProps) {
|
||||
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