@logora/debate 0.3.83 → 0.3.84
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.
|
@@ -67,7 +67,7 @@ const We = ({
|
|
|
67
67
|
)
|
|
68
68
|
}
|
|
69
69
|
), e;
|
|
70
|
-
}, [i, W] = b(ce()), z = Se(), le = be(),
|
|
70
|
+
}, [i, W] = b(ce()), z = Se(), le = be(), y = we(), J = Be(), B = _e(), { isLoggedIn: C, isLoggingIn: K } = Ce();
|
|
71
71
|
L(() => {
|
|
72
72
|
K === !1 && (C ? ue(h) : g(!1));
|
|
73
73
|
}, [K, C]), L(() => {
|
|
@@ -86,7 +86,7 @@ const We = ({
|
|
|
86
86
|
), t = !!e.get("initVote"), a = Number.parseInt(e.get("positionId")) || !1;
|
|
87
87
|
return [t, a];
|
|
88
88
|
}, ue = (e) => {
|
|
89
|
-
g(!0), w && w(c),
|
|
89
|
+
g(!0), w && w(c), y.getOneWithToken("votes", `${v.toLowerCase()}/${e}`, {}).then((t) => {
|
|
90
90
|
t.data.data.resource ? (A(t.data.data.resource), f(!0), g(!1)) : (g(!1), f(!1));
|
|
91
91
|
}).catch((t) => {
|
|
92
92
|
g(!1);
|
|
@@ -101,7 +101,7 @@ const We = ({
|
|
|
101
101
|
groupId: h,
|
|
102
102
|
voteableType: v,
|
|
103
103
|
positionId: e
|
|
104
|
-
}), c ? (ve(e, c.position_id), p === !1 &&
|
|
104
|
+
}), c ? (ve(e, c.position_id), p === !1 && R(), e !== c.position_id && y.update("votes", c.id, t).then((n) => {
|
|
105
105
|
n.data.success && (A(n.data.data.resource), G(
|
|
106
106
|
B.formatMessage({
|
|
107
107
|
id: "header.vote_confirm_modal",
|
|
@@ -109,7 +109,7 @@ const We = ({
|
|
|
109
109
|
}),
|
|
110
110
|
{ type: "success" }
|
|
111
111
|
));
|
|
112
|
-
})) : (fe(e),
|
|
112
|
+
})) : (fe(e), R(), y.create("votes", t).then((n) => {
|
|
113
113
|
n.data.success && (A(n.data.data.resource), G(
|
|
114
114
|
B.formatMessage({
|
|
115
115
|
id: "header.vote_confirm_modal",
|
|
@@ -167,7 +167,7 @@ const We = ({
|
|
|
167
167
|
voteableType: v,
|
|
168
168
|
positionId: e
|
|
169
169
|
}), z({ loginAction: "vote" }));
|
|
170
|
-
},
|
|
170
|
+
}, R = () => {
|
|
171
171
|
p && ie(), f(!p);
|
|
172
172
|
}, he = (e, t) => {
|
|
173
173
|
let a;
|
|
@@ -276,7 +276,7 @@ const We = ({
|
|
|
276
276
|
"data-tid": "action_edit_vote",
|
|
277
277
|
className: o.voteActionButton,
|
|
278
278
|
type: "button",
|
|
279
|
-
onClick:
|
|
279
|
+
onClick: R,
|
|
280
280
|
children: /* @__PURE__ */ s(
|
|
281
281
|
m,
|
|
282
282
|
{
|
|
@@ -307,7 +307,7 @@ const We = ({
|
|
|
307
307
|
{
|
|
308
308
|
className: d(o.voteBoxActionsBody, {
|
|
309
309
|
[o.voteBoxActionsBodyColumn]: j,
|
|
310
|
-
[o.voteBoxActionsBodyOutlined]: J.
|
|
310
|
+
[o.voteBoxActionsBodyOutlined]: J.layout?.outlinedVoteButtons,
|
|
311
311
|
[F]: F
|
|
312
312
|
}),
|
|
313
313
|
children: r.map(
|