From 3bbc4cffe8b0e649f735638b92c5632a5b5c43b4 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Mon, 20 Jun 2022 16:55:08 -0500 Subject: [PATCH] actions/status-hover-card: convert to TypeScript --- app/soapbox/actions/status-hover-card.js | Bin 543 -> 0 bytes app/soapbox/actions/status-hover-card.ts | 27 +++++++++++++++++++++++ 2 files changed, 27 insertions(+) delete mode 100644 app/soapbox/actions/status-hover-card.js create mode 100644 app/soapbox/actions/status-hover-card.ts diff --git a/app/soapbox/actions/status-hover-card.js b/app/soapbox/actions/status-hover-card.js deleted file mode 100644 index 85a946e1f94dcf93d284b93783673b71701bbe0f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 543 zcmb7=%?g7s5QOhO#olbeC#duwDp)90{OMIf+(1DRNn&X!zI!!d4^>;dZ8Dp0CWDVg zNDWkQr6J3`yvWKZzJ_V(dudR{NqB)H*vpFTTKM~Ykpx~IE)z!WKf^!A*$To)JzYA%mHOCPt_h?7Jx+EN^V8~{cP~C(t*=259@3kCdzQ? rT&tT0Xq$>?{Eo1}b!=zdfYw6I_)JKOecO!G3OAUU9>=d4#K-mxJtwLi diff --git a/app/soapbox/actions/status-hover-card.ts b/app/soapbox/actions/status-hover-card.ts new file mode 100644 index 0000000000..2ce24a7450 --- /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, +};