@selfcommunity/react-core 0.4.0-alpha.114 → 0.4.0-alpha.116

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -31,7 +31,12 @@ function useSCFetchVote({ id, contribution = null, contributionType, onVote = nu
31
31
  const scUserContext = (0, SCUserProvider_1.useSCUser)();
32
32
  const scVoteContext = (0, SCVoteProvider_1.useSCVote)();
33
33
  const reactions = (0, react_1.useMemo)(() => {
34
- return { default: scVoteContext.reactions.find((reaction) => reaction.id === 1), reactions: scVoteContext.reactions, isLoading: scVoteContext.isLoading };
34
+ var _a;
35
+ return {
36
+ default: (_a = scVoteContext.reactions) === null || _a === void 0 ? void 0 : _a.find((reaction) => reaction.id === 1),
37
+ reactions: scVoteContext.reactions,
38
+ isLoading: scVoteContext.isLoading,
39
+ };
35
40
  }, [scVoteContext.reactions, scVoteContext.isLoading]);
36
41
  const fetchObject = (0, react_1.useMemo)(() => () => {
37
42
  setIsLoading(true);
@@ -29,7 +29,12 @@ export default function useSCFetchVote({ id, contribution = null, contributionTy
29
29
  const scUserContext = useSCUser();
30
30
  const scVoteContext = useSCVote();
31
31
  const reactions = useMemo(() => {
32
- return { default: scVoteContext.reactions.find((reaction) => reaction.id === 1), reactions: scVoteContext.reactions, isLoading: scVoteContext.isLoading };
32
+ var _a;
33
+ return {
34
+ default: (_a = scVoteContext.reactions) === null || _a === void 0 ? void 0 : _a.find((reaction) => reaction.id === 1),
35
+ reactions: scVoteContext.reactions,
36
+ isLoading: scVoteContext.isLoading,
37
+ };
33
38
  }, [scVoteContext.reactions, scVoteContext.isLoading]);
34
39
  const fetchObject = useMemo(() => () => {
35
40
  setIsLoading(true);