frst-components 0.22.89 → 0.22.90
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.
package/dist/index.js
CHANGED
|
@@ -3322,7 +3322,7 @@ function Loading(props) {
|
|
|
3322
3322
|
|
|
3323
3323
|
const HypothesisComponent = ({ description, type, id, title, votes = [], onVote, canVote = false, canViewVote = false, userLoggedId, deleteVote, canViewListVotes, votesSingularText, votesPluralText, voteText, deleteVoteText, handleViewProfile, avatar, showAvatar, authorId, hasVoteGoal, loading }) => {
|
|
3324
3324
|
const [isHover, seIsHover] = React.useState(false);
|
|
3325
|
-
const [hasVoteHypothesis, setHasVoteHypothesis] = React.useState(
|
|
3325
|
+
const [hasVoteHypothesis, setHasVoteHypothesis] = React.useState(false);
|
|
3326
3326
|
const [showVotesList, setShowVotesList] = React.useState(false);
|
|
3327
3327
|
const ContainerRef = React.useRef(null);
|
|
3328
3328
|
const [heightContainer, seHeightContainer] = React.useState(0);
|
|
@@ -3337,6 +3337,9 @@ const HypothesisComponent = ({ description, type, id, title, votes = [], onVote,
|
|
|
3337
3337
|
setShowVotesList(false);
|
|
3338
3338
|
}
|
|
3339
3339
|
};
|
|
3340
|
+
React.useEffect(() => {
|
|
3341
|
+
setHasVoteHypothesis(votes?.some((vote) => vote?.user_uuid === userLoggedId));
|
|
3342
|
+
}, [votes]);
|
|
3340
3343
|
React.useEffect(() => {
|
|
3341
3344
|
document.addEventListener('mousedown', handleClickOutsideVote);
|
|
3342
3345
|
return () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/hypothesisComponent/index.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAK9B,eAAO,MAAM,mBAAmB;iBAuBjB,MAAM;UACb,MAAM;QACR,MAAM;WACH,MAAM;WACN,IAAI,EAAE;kBACC,MAAM;2BACG,MAAM,KAAK,GAAG;0BACf,MAAM,KAAK,GAAG;iCACP,MAAM,KAAK,GAAG;cACjC,OAAO;uBACE,OAAO;kBACZ,OAAO;kBACP,OAAO;wBACD,MAAM;sBACR,MAAM;eACb,MAAM;qBACA,MAAM;aACd,MAAM;iBACF,OAAO;eACT,MAAM;cACP,OAAO;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/hypothesisComponent/index.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAK9B,eAAO,MAAM,mBAAmB;iBAuBjB,MAAM;UACb,MAAM;QACR,MAAM;WACH,MAAM;WACN,IAAI,EAAE;kBACC,MAAM;2BACG,MAAM,KAAK,GAAG;0BACf,MAAM,KAAK,GAAG;iCACP,MAAM,KAAK,GAAG;cACjC,OAAO;uBACE,OAAO;kBACZ,OAAO;kBACP,OAAO;wBACD,MAAM;sBACR,MAAM;eACb,MAAM;qBACA,MAAM;aACd,MAAM;iBACF,OAAO;eACT,MAAM;cACP,OAAO;iBAmNlB,CAAA"}
|