actions/status-hover-card: convert to TypeScript
This commit is contained in:
parent
2d3d834a83
commit
3bbc4cffe8
2 changed files with 27 additions and 0 deletions
Binary file not shown.
27
app/soapbox/actions/status-hover-card.ts
Normal file
27
app/soapbox/actions/status-hover-card.ts
Normal file
|
@ -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<HTMLDivElement>, 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,
|
||||||
|
};
|
Loading…
Reference in a new issue