@mushi-mushi/react-native 0.15.1 → 0.15.2
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.cjs +10 -7
- package/dist/index.js +10 -7
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -328,6 +328,7 @@ var CATEGORIES = [
|
|
|
328
328
|
{ key: "confusing", emoji: "\u{1F615}", label: "Confusing" },
|
|
329
329
|
{ key: "other", emoji: "\u{1F4AC}", label: "Other" }
|
|
330
330
|
];
|
|
331
|
+
var VERIFIABLE_STATUSES = /* @__PURE__ */ new Set(["fixed", "resolved", "verified"]);
|
|
331
332
|
var MushiBottomSheet = ({
|
|
332
333
|
visible,
|
|
333
334
|
onClose,
|
|
@@ -349,12 +350,6 @@ var MushiBottomSheet = ({
|
|
|
349
350
|
const [threadComments, setThreadComments] = (0, import_react.useState)([]);
|
|
350
351
|
const [replyText, setReplyText] = (0, import_react.useState)("");
|
|
351
352
|
const [screenshotAttached, setScreenshotAttached] = (0, import_react.useState)(true);
|
|
352
|
-
(0, import_react.useEffect)(() => {
|
|
353
|
-
if (visible) {
|
|
354
|
-
setScreenshotAttached(true);
|
|
355
|
-
if (sheetTab === "inbox") void loadInbox();
|
|
356
|
-
}
|
|
357
|
-
}, [visible, sheetTab]);
|
|
358
353
|
const loadInbox = (0, import_react.useCallback)(async () => {
|
|
359
354
|
if (!mushi?.listMyReports) return;
|
|
360
355
|
setInboxLoading(true);
|
|
@@ -365,6 +360,12 @@ var MushiBottomSheet = ({
|
|
|
365
360
|
setInboxLoading(false);
|
|
366
361
|
}
|
|
367
362
|
}, [mushi]);
|
|
363
|
+
(0, import_react.useEffect)(() => {
|
|
364
|
+
if (visible) {
|
|
365
|
+
setScreenshotAttached(true);
|
|
366
|
+
if (sheetTab === "inbox") void loadInbox();
|
|
367
|
+
}
|
|
368
|
+
}, [visible, sheetTab, loadInbox]);
|
|
368
369
|
const openThread = (0, import_react.useCallback)(async (reportId) => {
|
|
369
370
|
setSelectedReportId(reportId);
|
|
370
371
|
if (!mushi?.listMyComments) return;
|
|
@@ -509,7 +510,9 @@ var MushiBottomSheet = ({
|
|
|
509
510
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.Text, { style: { color: colors.sub, fontSize: 11 }, children: c.author_kind }),
|
|
510
511
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.Text, { style: { color: colors.text }, children: c.body })
|
|
511
512
|
] }, c.id)),
|
|
512
|
-
|
|
513
|
+
VERIFIABLE_STATUSES.has(
|
|
514
|
+
inboxReports.find((r) => r.id === selectedReportId)?.status ?? ""
|
|
515
|
+
) && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react_native2.View, { style: s.verifyRow, children: [
|
|
513
516
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.TouchableOpacity, { style: [s.verifyBtn, { backgroundColor: colors.accent }], onPress: () => submitFeedback("confirms"), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.Text, { style: s.submitText, children: "Yes, fixed" }) }),
|
|
514
517
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.TouchableOpacity, { style: [s.verifyBtn, { backgroundColor: colors.border }], onPress: () => submitFeedback("not_fixed"), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native2.Text, { style: [s.submitText, { color: colors.text }], children: "Not fixed" }) })
|
|
515
518
|
] }),
|
package/dist/index.js
CHANGED
|
@@ -319,6 +319,7 @@ var CATEGORIES = [
|
|
|
319
319
|
{ key: "confusing", emoji: "\u{1F615}", label: "Confusing" },
|
|
320
320
|
{ key: "other", emoji: "\u{1F4AC}", label: "Other" }
|
|
321
321
|
];
|
|
322
|
+
var VERIFIABLE_STATUSES = /* @__PURE__ */ new Set(["fixed", "resolved", "verified"]);
|
|
322
323
|
var MushiBottomSheet = ({
|
|
323
324
|
visible,
|
|
324
325
|
onClose,
|
|
@@ -340,12 +341,6 @@ var MushiBottomSheet = ({
|
|
|
340
341
|
const [threadComments, setThreadComments] = useState([]);
|
|
341
342
|
const [replyText, setReplyText] = useState("");
|
|
342
343
|
const [screenshotAttached, setScreenshotAttached] = useState(true);
|
|
343
|
-
useEffect(() => {
|
|
344
|
-
if (visible) {
|
|
345
|
-
setScreenshotAttached(true);
|
|
346
|
-
if (sheetTab === "inbox") void loadInbox();
|
|
347
|
-
}
|
|
348
|
-
}, [visible, sheetTab]);
|
|
349
344
|
const loadInbox = useCallback(async () => {
|
|
350
345
|
if (!mushi?.listMyReports) return;
|
|
351
346
|
setInboxLoading(true);
|
|
@@ -356,6 +351,12 @@ var MushiBottomSheet = ({
|
|
|
356
351
|
setInboxLoading(false);
|
|
357
352
|
}
|
|
358
353
|
}, [mushi]);
|
|
354
|
+
useEffect(() => {
|
|
355
|
+
if (visible) {
|
|
356
|
+
setScreenshotAttached(true);
|
|
357
|
+
if (sheetTab === "inbox") void loadInbox();
|
|
358
|
+
}
|
|
359
|
+
}, [visible, sheetTab, loadInbox]);
|
|
359
360
|
const openThread = useCallback(async (reportId) => {
|
|
360
361
|
setSelectedReportId(reportId);
|
|
361
362
|
if (!mushi?.listMyComments) return;
|
|
@@ -500,7 +501,9 @@ var MushiBottomSheet = ({
|
|
|
500
501
|
/* @__PURE__ */ jsx(Text, { style: { color: colors.sub, fontSize: 11 }, children: c.author_kind }),
|
|
501
502
|
/* @__PURE__ */ jsx(Text, { style: { color: colors.text }, children: c.body })
|
|
502
503
|
] }, c.id)),
|
|
503
|
-
|
|
504
|
+
VERIFIABLE_STATUSES.has(
|
|
505
|
+
inboxReports.find((r) => r.id === selectedReportId)?.status ?? ""
|
|
506
|
+
) && /* @__PURE__ */ jsxs(View, { style: s.verifyRow, children: [
|
|
504
507
|
/* @__PURE__ */ jsx(TouchableOpacity, { style: [s.verifyBtn, { backgroundColor: colors.accent }], onPress: () => submitFeedback("confirms"), children: /* @__PURE__ */ jsx(Text, { style: s.submitText, children: "Yes, fixed" }) }),
|
|
505
508
|
/* @__PURE__ */ jsx(TouchableOpacity, { style: [s.verifyBtn, { backgroundColor: colors.border }], onPress: () => submitFeedback("not_fixed"), children: /* @__PURE__ */ jsx(Text, { style: [s.submitText, { color: colors.text }], children: "Not fixed" }) })
|
|
506
509
|
] }),
|
package/package.json
CHANGED