gomtm 0.0.272 → 0.0.273

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.
@@ -5,7 +5,7 @@ const MtUnaryCallErrorView = (props) => {
5
5
  return /* @__PURE__ */ jsxs("div", { className: "bg-red-400 p-4", children: [
6
6
  "code: ",
7
7
  unaryError.errCode,
8
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx("pre", { className: "prose dark:prose-invert break-words", children: unaryError.errMessage }) }),
8
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx("pre", { className: "prose dark:prose-invert flex-wrap text-wrap break-words", children: unaryError.errMessage }) }),
9
9
  retry && /* @__PURE__ */ jsx("button", { onClick: () => {
10
10
  retry();
11
11
  }, children: "retry" })
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import { PlainMessage } from "@bufbuild/protobuf";
3
+ import { MtmError } from "../gomtmpb/mtm/sppb/mtm_pb";
4
+ export declare const MtmErrorView: (props: {
5
+ gomtmError: PlainMessage<MtmError>;
6
+ }) => import("react").JSX.Element;
@@ -0,0 +1,12 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ const MtmErrorView = (props) => {
4
+ const { gomtmError } = props;
5
+ return /* @__PURE__ */ jsxs("div", { children: [
6
+ "MtmErrorView",
7
+ /* @__PURE__ */ jsx("pre", { children: JSON.stringify(gomtmError, null, 2) })
8
+ ] });
9
+ };
10
+ export {
11
+ MtmErrorView
12
+ };
@@ -103,7 +103,7 @@ function CommonListView() {
103
103
  const listQuery = useSuspenseInfiniteQuery(listView.methodList, {
104
104
  params: {
105
105
  params: {
106
- q: listView.params.q
106
+ q: listView.params.q || ""
107
107
  }
108
108
  },
109
109
  pagination: {
@@ -131,7 +131,7 @@ function CommonListView() {
131
131
  ),
132
132
  children: listQuery.data.pages.map((page, i) => {
133
133
  var _a;
134
- if (page.error_code) {
134
+ if (page.errCode) {
135
135
  return /* @__PURE__ */ jsx(MtUnaryCallErrorView, { unaryError: page }, i);
136
136
  } else {
137
137
  return /* @__PURE__ */ jsx(ListLayout, { layout: page.listLayout, children: (_a = page == null ? void 0 : page.items) == null ? void 0 : _a.map((item, j) => /* @__PURE__ */ jsx(ListItemView, { item }, `${i}-${j}`)) }, i);
@@ -111,7 +111,7 @@ const gomtmFetcher = (initGlobal) => {
111
111
  }, (initGlobal == null ? void 0 : initGlobal.cookieStr) && { "Cookie": initGlobal == null ? void 0 : initGlobal.cookieStr })
112
112
  });
113
113
  let fetcher = fetch;
114
- req.enableCache = true;
114
+ req.enableCache = false;
115
115
  if (req.enableCache) {
116
116
  fetcher = fetchMiddleWithCache(fetch);
117
117
  }
@@ -121,6 +121,7 @@ const gomtmFetcher = (initGlobal) => {
121
121
  init
122
122
  });
123
123
  const responseData = yield fetcher(input, init);
124
+ console.log("[mtmfetch response]", responseData);
124
125
  return responseData;
125
126
  } catch (e) {
126
127
  console.error("[mtmfetch error]", {