diff --git a/app/soapbox/actions/status-hover-card.js b/app/soapbox/actions/status-hover-card.js deleted file mode 100644 index 85a946e1f..000000000 --- a/app/soapbox/actions/status-hover-card.js +++ /dev/null @@ -1,24 +0,0 @@ -export const STATUS_HOVER_CARD_OPEN = 'STATUS_HOVER_CARD_OPEN'; -export const STATUS_HOVER_CARD_UPDATE = 'STATUS_HOVER_CARD_UPDATE'; -export const STATUS_HOVER_CARD_CLOSE = 'STATUS_HOVER_CARD_CLOSE'; - -export function openStatusHoverCard(ref, statusId) { - return { - type: STATUS_HOVER_CARD_OPEN, - ref, - statusId, - }; -} - -export function updateStatusHoverCard() { - return { - type: STATUS_HOVER_CARD_UPDATE, - }; -} - -export function closeStatusHoverCard(force = false) { - return { - type: STATUS_HOVER_CARD_CLOSE, - force, - }; -} diff --git a/app/soapbox/actions/status-hover-card.ts b/app/soapbox/actions/status-hover-card.ts new file mode 100644 index 000000000..2ce24a745 --- /dev/null +++ b/app/soapbox/actions/status-hover-card.ts @@ -0,0 +1,27 @@ +const STATUS_HOVER_CARD_OPEN = 'STATUS_HOVER_CARD_OPEN'; +const STATUS_HOVER_CARD_UPDATE = 'STATUS_HOVER_CARD_UPDATE'; +const STATUS_HOVER_CARD_CLOSE = 'STATUS_HOVER_CARD_CLOSE'; + +const openStatusHoverCard = (ref: React.MutableRefObject, statusId: string) => ({ + type: STATUS_HOVER_CARD_OPEN, + ref, + statusId, +}); + +const updateStatusHoverCard = () => ({ + type: STATUS_HOVER_CARD_UPDATE, +}); + +const closeStatusHoverCard = (force = false) => ({ + type: STATUS_HOVER_CARD_CLOSE, + force, +}); + +export { + STATUS_HOVER_CARD_OPEN, + STATUS_HOVER_CARD_UPDATE, + STATUS_HOVER_CARD_CLOSE, + openStatusHoverCard, + updateStatusHoverCard, + closeStatusHoverCard, +};