Details
Details
Ran the following code to test, and confirmed output in my console (only including the relevant testing code).
import { fetchPinnedMessages } from 'lib/actions/message-actions.js';
const callFetchPinnedMessages = useServerCall(fetchPinnedMessages);
React.useEffect(() => {
const getPins = async () => {
const pins = await callFetchPinnedMessages({ threadID });
console.log(pins);
};
getPins();
}, [...]);Diff Detail
Diff Detail
- Repository
- rCOMM Comm
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
| lib/actions/message-actions.js | ||
|---|---|---|
| 253 ↗ | (On Diff #23908) | Why it is optional? We're always returning a new object from this function. A better approach would be to make the response mandatory and return e.g. an empty array if there are no pins. |
