@burdenoff/microfe-mybodyshield 2026.1101.2 → 2026.1107.1
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/README.md +2 -0
- package/dist/mybodyshield/MyBodyShieldRoutes.d.ts.map +1 -1
- package/dist/mybodyshield/MyBodyShieldRoutes.js +35 -24
- package/dist/mybodyshield/MyBodyShieldRoutes.js.map +1 -1
- package/dist/mybodyshield/hooks/index.js +9 -9
- package/dist/mybodyshield/hooks/useMyBodyShieldApi.d.ts +16 -1
- package/dist/mybodyshield/hooks/useMyBodyShieldApi.d.ts.map +1 -1
- package/dist/mybodyshield/hooks/useMyBodyShieldApi.js +326 -229
- package/dist/mybodyshield/hooks/useMyBodyShieldApi.js.map +1 -1
- package/dist/mybodyshield/pages/community/CommunityPage.d.ts +16 -0
- package/dist/mybodyshield/pages/community/CommunityPage.d.ts.map +1 -0
- package/dist/mybodyshield/pages/community/CommunityPage.js +724 -0
- package/dist/mybodyshield/pages/community/CommunityPage.js.map +1 -0
- package/dist/mybodyshield/types/index.d.ts +81 -0
- package/dist/mybodyshield/types/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,724 @@
|
|
|
1
|
+
import { useMyBodyShield as e } from "../../context/MyBodyShieldContext.js";
|
|
2
|
+
import { PageLayout as t } from "../../components/PageLayout.js";
|
|
3
|
+
import "../../components/index.js";
|
|
4
|
+
import { StatusBadge as n } from "../../components/StatusBadge.js";
|
|
5
|
+
import { EmptyState as r } from "../../components/EmptyState.js";
|
|
6
|
+
import "../../context/index.js";
|
|
7
|
+
import { useMybCancelChallenge as i, useMybChallengeLeaderboard as a, useMybChallenges as o, useMybCreateChallenge as s, useMybDeleteMySocialPost as c, useMybGiveKudos as l, useMybJoinChallenge as u, useMybLeaveChallenge as d, useMybModerateSocialPost as f, useMybMySocialProfile as p, useMybRemoveKudos as m, useMybShareToFeed as h, useMybShareableItems as g, useMybSocialFeed as _, useMybUpdateMySocialProfile as v } from "../../hooks/useMyBodyShieldApi.js";
|
|
8
|
+
import { useTr as y } from "../../hooks/useTr.js";
|
|
9
|
+
import "../../hooks/index.js";
|
|
10
|
+
import { ErrorView as b, LoadingView as x, Section as S } from "../../components/StateViews.js";
|
|
11
|
+
import { Tabs as ee } from "../../components/Tabs.js";
|
|
12
|
+
import { MybDiscussion as C } from "../../components/MybDiscussion.js";
|
|
13
|
+
import { formatDate as w, formatRelativeTime as te } from "../../utils/formatters.js";
|
|
14
|
+
import { useMemo as T, useState as E } from "react";
|
|
15
|
+
import { Heart as D, Lock as O, Medal as k, MessageSquare as A, Plus as j, Share2 as ne, ShieldCheck as re, Trash2 as ie, Trophy as M, Users as ae } from "lucide-react";
|
|
16
|
+
import { Fragment as N, jsx as P, jsxs as F } from "react/jsx-runtime";
|
|
17
|
+
import { Button as I, GlassCard as L, Input as R, Label as z, ResponsiveDialog as B, ResponsiveDialogContent as V, ResponsiveDialogDescription as H, ResponsiveDialogFooter as U, ResponsiveDialogHeader as W, ResponsiveDialogTitle as G, Select as oe, SelectContent as se, SelectItem as K, SelectTrigger as ce, SelectValue as le, Switch as ue, Textarea as q } from "@burdenoff/fe-libs/ui";
|
|
18
|
+
import { usePermission as J } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
19
|
+
// src/mybodyshield/pages/community/CommunityPage.tsx
|
|
20
|
+
var Y = 50, X = (e, t) => e instanceof Error && e.message ? e.message : t, Z = (e) => {
|
|
21
|
+
let t = (e) => String(e).padStart(2, "0");
|
|
22
|
+
return `${e.getFullYear()}-${t(e.getMonth() + 1)}-${t(e.getDate())}`;
|
|
23
|
+
};
|
|
24
|
+
function Q({ label: e, title: t, description: n, confirmLabel: r, onConfirm: i, disabled: a, children: o }) {
|
|
25
|
+
let s = y(), [c, l] = E(!1);
|
|
26
|
+
return /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ P(I, {
|
|
27
|
+
variant: "ghost",
|
|
28
|
+
size: "sm",
|
|
29
|
+
"aria-label": e,
|
|
30
|
+
disabled: a,
|
|
31
|
+
onClick: () => l(!0),
|
|
32
|
+
children: o
|
|
33
|
+
}), /* @__PURE__ */ P(B, {
|
|
34
|
+
open: c,
|
|
35
|
+
onOpenChange: l,
|
|
36
|
+
children: /* @__PURE__ */ F(V, { children: [/* @__PURE__ */ F(W, { children: [/* @__PURE__ */ P(G, { children: t }), /* @__PURE__ */ P(H, { children: n })] }), /* @__PURE__ */ F(U, { children: [/* @__PURE__ */ P(I, {
|
|
37
|
+
variant: "outline",
|
|
38
|
+
onClick: () => l(!1),
|
|
39
|
+
children: s("mybodyshield.common.cancel", "Cancel")
|
|
40
|
+
}), /* @__PURE__ */ P(I, {
|
|
41
|
+
variant: "destructive",
|
|
42
|
+
onClick: () => {
|
|
43
|
+
l(!1), i();
|
|
44
|
+
},
|
|
45
|
+
children: r
|
|
46
|
+
})] })] })
|
|
47
|
+
})] });
|
|
48
|
+
}
|
|
49
|
+
function de({ profile: e }) {
|
|
50
|
+
let t = y(), n = v(), [r, i] = E(e?.displayName ?? ""), [a, o] = E(null), [s, c] = E(!1), l = e?.shareActivity ?? !1, u = async (e) => {
|
|
51
|
+
o(null), c(!1);
|
|
52
|
+
try {
|
|
53
|
+
await n.mutateAsync(e), c(!0);
|
|
54
|
+
} catch (e) {
|
|
55
|
+
o(X(e, t("mybodyshield.community.profileSaveFailed", "Could not save.")));
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
return /* @__PURE__ */ P(S, {
|
|
59
|
+
title: t("mybodyshield.community.privacyTitle", "Community privacy"),
|
|
60
|
+
description: t("mybodyshield.community.privacyDescription", "Only what you explicitly share appears in the community. Your health records, notes and metrics are never shown."),
|
|
61
|
+
children: /* @__PURE__ */ F("div", {
|
|
62
|
+
className: "space-y-6",
|
|
63
|
+
"data-testid": "myb-community-privacy",
|
|
64
|
+
children: [
|
|
65
|
+
a && /* @__PURE__ */ P("p", {
|
|
66
|
+
className: "rounded-lg bg-status-error-bg-subtle px-3 py-2 text-sm text-status-error-text",
|
|
67
|
+
children: a
|
|
68
|
+
}),
|
|
69
|
+
s && !a && /* @__PURE__ */ P("p", {
|
|
70
|
+
className: "rounded-lg bg-status-success-bg px-3 py-2 text-sm text-status-success-text",
|
|
71
|
+
children: t("mybodyshield.community.profileSaved", "Saved.")
|
|
72
|
+
}),
|
|
73
|
+
/* @__PURE__ */ F("div", {
|
|
74
|
+
className: "flex items-start justify-between gap-4 rounded-lg border border-edge-default p-4",
|
|
75
|
+
children: [/* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P(z, {
|
|
76
|
+
htmlFor: "myb-community-share",
|
|
77
|
+
className: "text-text-primary",
|
|
78
|
+
children: t("mybodyshield.community.shareToggle", "Share activity with my workspace")
|
|
79
|
+
}), /* @__PURE__ */ P("p", {
|
|
80
|
+
className: "mt-1 text-sm text-text-secondary",
|
|
81
|
+
children: t("mybodyshield.community.shareToggleHelp", "Required before you can post to the feed. Turning this off hides every post you have shared.")
|
|
82
|
+
})] }), /* @__PURE__ */ P(ue, {
|
|
83
|
+
id: "myb-community-share",
|
|
84
|
+
checked: l,
|
|
85
|
+
disabled: n.isPending,
|
|
86
|
+
onCheckedChange: (e) => void u({ shareActivity: e })
|
|
87
|
+
})]
|
|
88
|
+
}),
|
|
89
|
+
/* @__PURE__ */ F("form", {
|
|
90
|
+
className: "space-y-2",
|
|
91
|
+
onSubmit: (e) => {
|
|
92
|
+
e.preventDefault(), u({ displayName: r.trim() });
|
|
93
|
+
},
|
|
94
|
+
children: [
|
|
95
|
+
/* @__PURE__ */ P(z, {
|
|
96
|
+
htmlFor: "myb-community-name",
|
|
97
|
+
children: t("mybodyshield.community.displayName", "Community display name")
|
|
98
|
+
}),
|
|
99
|
+
/* @__PURE__ */ F("div", {
|
|
100
|
+
className: "flex flex-col gap-2 sm:flex-row",
|
|
101
|
+
children: [/* @__PURE__ */ P(R, {
|
|
102
|
+
id: "myb-community-name",
|
|
103
|
+
value: r,
|
|
104
|
+
maxLength: 60,
|
|
105
|
+
onChange: (e) => i(e.target.value),
|
|
106
|
+
placeholder: t("mybodyshield.community.displayNamePlaceholder", "e.g., Asha R.")
|
|
107
|
+
}), /* @__PURE__ */ P(I, {
|
|
108
|
+
type: "submit",
|
|
109
|
+
disabled: n.isPending,
|
|
110
|
+
children: t("mybodyshield.common.save", "Save")
|
|
111
|
+
})]
|
|
112
|
+
}),
|
|
113
|
+
/* @__PURE__ */ P("p", {
|
|
114
|
+
className: "text-sm text-text-secondary",
|
|
115
|
+
children: t("mybodyshield.community.displayNameHelp", "Shown on your posts and on challenge leaderboards. Leave empty to appear as \"Member\".")
|
|
116
|
+
})
|
|
117
|
+
]
|
|
118
|
+
})
|
|
119
|
+
]
|
|
120
|
+
})
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
function fe({ open: e, onOpenChange: t }) {
|
|
124
|
+
let n = y(), i = g(e), a = h(), [o, s] = E(null), [c, l] = E(""), [u, d] = E("WORKSPACE"), [f, p] = E(null), m = () => {
|
|
125
|
+
s(null), l(""), d("WORKSPACE"), p(null);
|
|
126
|
+
}, _ = async () => {
|
|
127
|
+
if (!o) p(n("mybodyshield.community.pickItem", "Pick something to share."));
|
|
128
|
+
else try {
|
|
129
|
+
await a.mutateAsync({
|
|
130
|
+
kind: o.kind,
|
|
131
|
+
sourceId: o.sourceId,
|
|
132
|
+
caption: c.trim() || void 0,
|
|
133
|
+
visibility: u
|
|
134
|
+
}), m(), t(!1);
|
|
135
|
+
} catch (e) {
|
|
136
|
+
p(X(e, n("mybodyshield.community.shareFailed", "Could not share.")));
|
|
137
|
+
}
|
|
138
|
+
}, v = (i.data ?? []).filter((e) => !e.alreadyShared);
|
|
139
|
+
return /* @__PURE__ */ P(B, {
|
|
140
|
+
open: e,
|
|
141
|
+
onOpenChange: (e) => {
|
|
142
|
+
e || m(), t(e);
|
|
143
|
+
},
|
|
144
|
+
children: /* @__PURE__ */ F(V, { children: [
|
|
145
|
+
/* @__PURE__ */ F(W, { children: [/* @__PURE__ */ P(G, { children: n("mybodyshield.community.shareTitle", "Share to the feed") }), /* @__PURE__ */ P(H, { children: n("mybodyshield.community.shareDescription", "Share a completed session or an achievement. Only the title and highlights shown here are posted.") })] }),
|
|
146
|
+
/* @__PURE__ */ F("div", {
|
|
147
|
+
className: "space-y-4",
|
|
148
|
+
children: [
|
|
149
|
+
f && /* @__PURE__ */ P("p", {
|
|
150
|
+
className: "rounded-lg bg-status-error-bg-subtle px-3 py-2 text-sm text-status-error-text",
|
|
151
|
+
children: f
|
|
152
|
+
}),
|
|
153
|
+
i.isLoading ? /* @__PURE__ */ P(x, { label: n("mybodyshield.community.loadingShareable", "Loading your activity…") }) : v.length === 0 ? /* @__PURE__ */ P(r, {
|
|
154
|
+
title: n("mybodyshield.community.nothingToShare", "Nothing new to share"),
|
|
155
|
+
description: n("mybodyshield.community.nothingToShareHelp", "Complete a workout session, achieve a goal or reach a challenge target, then share it here.")
|
|
156
|
+
}) : /* @__PURE__ */ P("div", {
|
|
157
|
+
className: "max-h-64 space-y-2 overflow-y-auto",
|
|
158
|
+
role: "group",
|
|
159
|
+
"aria-label": n("mybodyshield.community.pickItemLabel", "Activity to share"),
|
|
160
|
+
children: v.map((e) => {
|
|
161
|
+
let t = o?.kind === e.kind && o.sourceId === e.sourceId;
|
|
162
|
+
return /* @__PURE__ */ F("button", {
|
|
163
|
+
type: "button",
|
|
164
|
+
"aria-pressed": t,
|
|
165
|
+
onClick: () => s(e),
|
|
166
|
+
className: `w-full rounded-lg border border-edge-default p-3 text-left ${t ? "bg-status-success-bg" : "bg-bg-surface"}`,
|
|
167
|
+
children: [/* @__PURE__ */ P("div", {
|
|
168
|
+
className: "font-medium text-text-primary",
|
|
169
|
+
children: e.title
|
|
170
|
+
}), /* @__PURE__ */ P("div", {
|
|
171
|
+
className: "text-sm text-text-secondary",
|
|
172
|
+
children: w(e.occurredAt)
|
|
173
|
+
})]
|
|
174
|
+
}, `${e.kind}:${e.sourceId}`);
|
|
175
|
+
})
|
|
176
|
+
}),
|
|
177
|
+
/* @__PURE__ */ F("div", {
|
|
178
|
+
className: "space-y-2",
|
|
179
|
+
children: [/* @__PURE__ */ P(z, {
|
|
180
|
+
htmlFor: "myb-share-caption",
|
|
181
|
+
children: n("mybodyshield.community.caption", "Caption (optional)")
|
|
182
|
+
}), /* @__PURE__ */ P(q, {
|
|
183
|
+
id: "myb-share-caption",
|
|
184
|
+
rows: 2,
|
|
185
|
+
maxLength: 280,
|
|
186
|
+
value: c,
|
|
187
|
+
onChange: (e) => l(e.target.value)
|
|
188
|
+
})]
|
|
189
|
+
}),
|
|
190
|
+
/* @__PURE__ */ F("div", {
|
|
191
|
+
className: "space-y-2",
|
|
192
|
+
children: [/* @__PURE__ */ P(z, {
|
|
193
|
+
htmlFor: "myb-share-visibility",
|
|
194
|
+
children: n("mybodyshield.community.visibility", "Who can see this")
|
|
195
|
+
}), /* @__PURE__ */ F(oe, {
|
|
196
|
+
value: u,
|
|
197
|
+
onValueChange: (e) => {
|
|
198
|
+
(e === "WORKSPACE" || e === "COACHES") && d(e);
|
|
199
|
+
},
|
|
200
|
+
children: [/* @__PURE__ */ P(ce, {
|
|
201
|
+
id: "myb-share-visibility",
|
|
202
|
+
children: /* @__PURE__ */ P(le, {})
|
|
203
|
+
}), /* @__PURE__ */ F(se, { children: [/* @__PURE__ */ P(K, {
|
|
204
|
+
value: "WORKSPACE",
|
|
205
|
+
children: n("mybodyshield.community.visibilityWorkspace", "Everyone in this workspace")
|
|
206
|
+
}), /* @__PURE__ */ P(K, {
|
|
207
|
+
value: "COACHES",
|
|
208
|
+
children: n("mybodyshield.community.visibilityCoaches", "Only my coaches")
|
|
209
|
+
})] })]
|
|
210
|
+
})]
|
|
211
|
+
})
|
|
212
|
+
]
|
|
213
|
+
}),
|
|
214
|
+
/* @__PURE__ */ F(U, { children: [/* @__PURE__ */ P(I, {
|
|
215
|
+
variant: "outline",
|
|
216
|
+
onClick: () => t(!1),
|
|
217
|
+
children: n("mybodyshield.common.cancel", "Cancel")
|
|
218
|
+
}), /* @__PURE__ */ P(I, {
|
|
219
|
+
onClick: () => void _(),
|
|
220
|
+
disabled: a.isPending || !o,
|
|
221
|
+
children: n("mybodyshield.community.shareAction", "Share")
|
|
222
|
+
})] })
|
|
223
|
+
] })
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
function pe({ post: e, canModerate: t }) {
|
|
227
|
+
let n = y(), r = l(), i = m(), a = c(), o = f(), [s, u] = E(!1), [d, p] = E(null), h = async (e) => {
|
|
228
|
+
p(null);
|
|
229
|
+
try {
|
|
230
|
+
await e();
|
|
231
|
+
} catch (e) {
|
|
232
|
+
p(X(e, n("mybodyshield.community.actionFailed", "Action failed.")));
|
|
233
|
+
}
|
|
234
|
+
}, g = e.isMine ? n("mybodyshield.community.you", "You") : e.authorDisplayName || n("mybodyshield.community.member", "Member");
|
|
235
|
+
return /* @__PURE__ */ F(L, {
|
|
236
|
+
className: "p-4",
|
|
237
|
+
"data-testid": "myb-feed-post",
|
|
238
|
+
children: [
|
|
239
|
+
/* @__PURE__ */ F("div", {
|
|
240
|
+
className: "flex items-start justify-between gap-3",
|
|
241
|
+
children: [/* @__PURE__ */ F("div", {
|
|
242
|
+
className: "min-w-0",
|
|
243
|
+
children: [
|
|
244
|
+
/* @__PURE__ */ F("p", {
|
|
245
|
+
className: "text-sm text-text-secondary",
|
|
246
|
+
children: [
|
|
247
|
+
/* @__PURE__ */ P("span", {
|
|
248
|
+
className: "font-medium text-text-primary",
|
|
249
|
+
children: g
|
|
250
|
+
}),
|
|
251
|
+
" ·",
|
|
252
|
+
" ",
|
|
253
|
+
te(e.createdAt),
|
|
254
|
+
e.visibility === "COACHES" && /* @__PURE__ */ F("span", {
|
|
255
|
+
className: "ml-2 inline-flex items-center gap-1",
|
|
256
|
+
children: [/* @__PURE__ */ P(O, {
|
|
257
|
+
className: "h-3 w-3",
|
|
258
|
+
"aria-hidden": "true"
|
|
259
|
+
}), n("mybodyshield.community.coachesOnly", "Coaches only")]
|
|
260
|
+
})
|
|
261
|
+
]
|
|
262
|
+
}),
|
|
263
|
+
/* @__PURE__ */ P("h3", {
|
|
264
|
+
className: "mt-1 font-semibold text-text-primary",
|
|
265
|
+
children: e.title
|
|
266
|
+
}),
|
|
267
|
+
e.caption && /* @__PURE__ */ P("p", {
|
|
268
|
+
className: "mt-1 text-sm text-text-primary",
|
|
269
|
+
children: e.caption
|
|
270
|
+
})
|
|
271
|
+
]
|
|
272
|
+
}), e.isMine ? /* @__PURE__ */ P(Q, {
|
|
273
|
+
label: n("mybodyshield.community.deletePost", "Delete post"),
|
|
274
|
+
title: n("mybodyshield.community.deletePostTitle", "Delete this post?"),
|
|
275
|
+
description: n("mybodyshield.community.deletePostDescription", "It is removed from the feed for everyone. Your session or achievement itself is not affected."),
|
|
276
|
+
confirmLabel: n("mybodyshield.common.delete", "Delete"),
|
|
277
|
+
disabled: a.isPending,
|
|
278
|
+
onConfirm: () => void h(() => a.mutateAsync(e.id)),
|
|
279
|
+
children: /* @__PURE__ */ P(ie, { className: "h-4 w-4" })
|
|
280
|
+
}) : t && /* @__PURE__ */ P(Q, {
|
|
281
|
+
label: n("mybodyshield.community.moderatePost", "Remove post (moderator)"),
|
|
282
|
+
title: n("mybodyshield.community.moderatePostTitle", "Remove this post from the feed?"),
|
|
283
|
+
description: n("mybodyshield.community.moderatePostDescription", "As a moderator you are removing another member's post for everyone in this workspace."),
|
|
284
|
+
confirmLabel: n("mybodyshield.community.remove", "Remove"),
|
|
285
|
+
disabled: o.isPending,
|
|
286
|
+
onConfirm: () => void h(() => o.mutateAsync(e.id)),
|
|
287
|
+
children: /* @__PURE__ */ P(re, { className: "h-4 w-4" })
|
|
288
|
+
})]
|
|
289
|
+
}),
|
|
290
|
+
e.highlights.length > 0 && /* @__PURE__ */ P("dl", {
|
|
291
|
+
className: "mt-3 flex flex-wrap gap-2",
|
|
292
|
+
children: e.highlights.map((e, t) => /* @__PURE__ */ F("div", {
|
|
293
|
+
className: "rounded-md bg-bg-subtle px-2 py-1 text-sm",
|
|
294
|
+
children: [/* @__PURE__ */ F("dt", {
|
|
295
|
+
className: "inline text-text-secondary",
|
|
296
|
+
children: [e.label, ": "]
|
|
297
|
+
}), /* @__PURE__ */ P("dd", {
|
|
298
|
+
className: "inline font-medium text-text-primary",
|
|
299
|
+
children: e.value
|
|
300
|
+
})]
|
|
301
|
+
}, `${e.label}-${t}`))
|
|
302
|
+
}),
|
|
303
|
+
d && /* @__PURE__ */ P("p", {
|
|
304
|
+
className: "mt-2 text-sm text-status-error-text",
|
|
305
|
+
children: d
|
|
306
|
+
}),
|
|
307
|
+
/* @__PURE__ */ F("div", {
|
|
308
|
+
className: "mt-3 flex items-center gap-2",
|
|
309
|
+
children: [/* @__PURE__ */ F(I, {
|
|
310
|
+
variant: e.hasGivenKudos ? "default" : "outline",
|
|
311
|
+
size: "sm",
|
|
312
|
+
"aria-pressed": e.hasGivenKudos,
|
|
313
|
+
disabled: r.isPending || i.isPending,
|
|
314
|
+
onClick: () => void h(() => e.hasGivenKudos ? i.mutateAsync(e.id) : r.mutateAsync(e.id)),
|
|
315
|
+
children: [
|
|
316
|
+
/* @__PURE__ */ P(D, {
|
|
317
|
+
className: "mr-1 h-4 w-4",
|
|
318
|
+
"aria-hidden": "true"
|
|
319
|
+
}),
|
|
320
|
+
n("mybodyshield.community.kudos", "Kudos"),
|
|
321
|
+
" · ",
|
|
322
|
+
e.kudosCount
|
|
323
|
+
]
|
|
324
|
+
}), e.visibility === "WORKSPACE" && /* @__PURE__ */ F(I, {
|
|
325
|
+
variant: "ghost",
|
|
326
|
+
size: "sm",
|
|
327
|
+
onClick: () => u((e) => !e),
|
|
328
|
+
children: [/* @__PURE__ */ P(A, {
|
|
329
|
+
className: "mr-1 h-4 w-4",
|
|
330
|
+
"aria-hidden": "true"
|
|
331
|
+
}), n("mybodyshield.community.comments", "Comments")]
|
|
332
|
+
})]
|
|
333
|
+
}),
|
|
334
|
+
s && e.visibility === "WORKSPACE" && /* @__PURE__ */ P("div", {
|
|
335
|
+
className: "mt-3",
|
|
336
|
+
children: /* @__PURE__ */ P(C, {
|
|
337
|
+
entityType: "mybodyshield-social-post",
|
|
338
|
+
entityId: e.id,
|
|
339
|
+
title: n("mybodyshield.community.comments", "Comments"),
|
|
340
|
+
description: n("mybodyshield.community.commentsHelp", "Comments are visible to everyone who can see this post.")
|
|
341
|
+
})
|
|
342
|
+
})
|
|
343
|
+
]
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
function me({ profile: e }) {
|
|
347
|
+
let t = y(), [n, i] = E(20), a = _({ limit: n }), o = J("mybodyshield-social-post:delete"), [s, c] = E(!1), l = e?.shareActivity ?? !1;
|
|
348
|
+
return /* @__PURE__ */ F(S, {
|
|
349
|
+
title: t("mybodyshield.community.feedTitle", "Workspace feed"),
|
|
350
|
+
description: t("mybodyshield.community.feedDescription", "Sessions and achievements your workspace chose to share."),
|
|
351
|
+
action: /* @__PURE__ */ F(I, {
|
|
352
|
+
onClick: () => c(!0),
|
|
353
|
+
disabled: !l,
|
|
354
|
+
children: [/* @__PURE__ */ P(ne, {
|
|
355
|
+
className: "mr-1 h-4 w-4",
|
|
356
|
+
"aria-hidden": "true"
|
|
357
|
+
}), t("mybodyshield.community.shareButton", "Share activity")]
|
|
358
|
+
}),
|
|
359
|
+
children: [
|
|
360
|
+
!l && /* @__PURE__ */ P("p", {
|
|
361
|
+
className: "mb-4 rounded-lg bg-bg-subtle px-3 py-2 text-sm text-text-secondary",
|
|
362
|
+
children: t("mybodyshield.community.optInHint", "Sharing is off. Turn it on in the Privacy tab to post your own activity.")
|
|
363
|
+
}),
|
|
364
|
+
a.isLoading ? /* @__PURE__ */ P(x, { label: t("mybodyshield.community.loadingFeed", "Loading feed…") }) : a.isError ? /* @__PURE__ */ P(b, {
|
|
365
|
+
message: t("mybodyshield.community.feedError", "Could not load the feed."),
|
|
366
|
+
onRetry: () => void a.refetch()
|
|
367
|
+
}) : (a.data?.items.length ?? 0) === 0 ? /* @__PURE__ */ P(r, {
|
|
368
|
+
illustration: "empty-people",
|
|
369
|
+
title: t("mybodyshield.community.feedEmpty", "No posts yet"),
|
|
370
|
+
description: t("mybodyshield.community.feedEmptyHelp", "When members share sessions or achievements, they appear here.")
|
|
371
|
+
}) : /* @__PURE__ */ F("div", {
|
|
372
|
+
className: "space-y-3",
|
|
373
|
+
children: [a.data?.items.map((e) => /* @__PURE__ */ P(pe, {
|
|
374
|
+
post: e,
|
|
375
|
+
canModerate: o
|
|
376
|
+
}, e.id)), a.data?.pageInfo.hasMore && n < Y && /* @__PURE__ */ P(I, {
|
|
377
|
+
variant: "outline",
|
|
378
|
+
onClick: () => i((e) => Math.min(e + 20, Y)),
|
|
379
|
+
children: t("mybodyshield.community.loadMore", "Show more")
|
|
380
|
+
})]
|
|
381
|
+
}),
|
|
382
|
+
/* @__PURE__ */ P(fe, {
|
|
383
|
+
open: s,
|
|
384
|
+
onOpenChange: c
|
|
385
|
+
})
|
|
386
|
+
]
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
function he({ open: e, onOpenChange: t }) {
|
|
390
|
+
let n = y(), r = s(), i = T(() => /* @__PURE__ */ new Date(), []), [a, o] = E(""), [c, l] = E(""), [u, d] = E(""), [f, p] = E(Z(i)), [m, h] = E(Z(new Date(i.getTime() + 2592e6))), [g, _] = E(null), v = () => {
|
|
391
|
+
o(""), l(""), d(""), p(Z(/* @__PURE__ */ new Date())), h(Z(new Date(Date.now() + 2592e6))), _(null);
|
|
392
|
+
}, b = async () => {
|
|
393
|
+
let e = a.trim();
|
|
394
|
+
if (!e) {
|
|
395
|
+
_(n("mybodyshield.community.challengeTitleRequired", "Title is required."));
|
|
396
|
+
return;
|
|
397
|
+
}
|
|
398
|
+
let i = /* @__PURE__ */ new Date(`${f}T00:00:00`), o = /* @__PURE__ */ new Date(`${m}T23:59:59`);
|
|
399
|
+
if (!(o > i)) {
|
|
400
|
+
_(n("mybodyshield.community.challengeDatesInvalid", "End date must be after the start date."));
|
|
401
|
+
return;
|
|
402
|
+
}
|
|
403
|
+
let s = u.trim() ? Number(u) : void 0;
|
|
404
|
+
if (s !== void 0 && (!Number.isInteger(s) || s <= 0)) _(n("mybodyshield.community.challengeTargetInvalid", "Target must be a positive whole number."));
|
|
405
|
+
else {
|
|
406
|
+
_(null);
|
|
407
|
+
try {
|
|
408
|
+
await r.mutateAsync({
|
|
409
|
+
title: e,
|
|
410
|
+
description: c.trim() || void 0,
|
|
411
|
+
metric: "SESSION_COUNT",
|
|
412
|
+
targetValue: s,
|
|
413
|
+
startDate: i.toISOString(),
|
|
414
|
+
endDate: o.toISOString()
|
|
415
|
+
}), v(), t(!1);
|
|
416
|
+
} catch (e) {
|
|
417
|
+
_(X(e, n("mybodyshield.community.challengeCreateFailed", "Could not create challenge.")));
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
};
|
|
421
|
+
return /* @__PURE__ */ P(B, {
|
|
422
|
+
open: e,
|
|
423
|
+
onOpenChange: (e) => {
|
|
424
|
+
e || v(), t(e);
|
|
425
|
+
},
|
|
426
|
+
children: /* @__PURE__ */ F(V, { children: [/* @__PURE__ */ F(W, { children: [/* @__PURE__ */ P(G, { children: n("mybodyshield.community.newChallenge", "New challenge") }), /* @__PURE__ */ P(H, { children: n("mybodyshield.community.newChallengeDescription", "Members who join are ranked by completed workout sessions between the start and end dates.") })] }), /* @__PURE__ */ F("form", {
|
|
427
|
+
className: "space-y-4",
|
|
428
|
+
onSubmit: (e) => {
|
|
429
|
+
e.preventDefault(), b();
|
|
430
|
+
},
|
|
431
|
+
children: [
|
|
432
|
+
g && /* @__PURE__ */ P("p", {
|
|
433
|
+
className: "rounded-lg bg-status-error-bg-subtle px-3 py-2 text-sm text-status-error-text",
|
|
434
|
+
children: g
|
|
435
|
+
}),
|
|
436
|
+
/* @__PURE__ */ F("div", {
|
|
437
|
+
className: "space-y-2",
|
|
438
|
+
children: [/* @__PURE__ */ P(z, {
|
|
439
|
+
htmlFor: "myb-challenge-title",
|
|
440
|
+
children: n("mybodyshield.community.challengeName", "Title")
|
|
441
|
+
}), /* @__PURE__ */ P(R, {
|
|
442
|
+
id: "myb-challenge-title",
|
|
443
|
+
value: a,
|
|
444
|
+
maxLength: 255,
|
|
445
|
+
onChange: (e) => o(e.target.value),
|
|
446
|
+
placeholder: n("mybodyshield.community.challengeNamePlaceholder", "e.g., Most sessions this month")
|
|
447
|
+
})]
|
|
448
|
+
}),
|
|
449
|
+
/* @__PURE__ */ F("div", {
|
|
450
|
+
className: "grid grid-cols-1 gap-4 sm:grid-cols-3",
|
|
451
|
+
children: [
|
|
452
|
+
/* @__PURE__ */ F("div", {
|
|
453
|
+
className: "space-y-2",
|
|
454
|
+
children: [/* @__PURE__ */ P(z, {
|
|
455
|
+
htmlFor: "myb-challenge-start",
|
|
456
|
+
children: n("mybodyshield.community.start", "Start")
|
|
457
|
+
}), /* @__PURE__ */ P(R, {
|
|
458
|
+
id: "myb-challenge-start",
|
|
459
|
+
type: "date",
|
|
460
|
+
value: f,
|
|
461
|
+
onChange: (e) => p(e.target.value)
|
|
462
|
+
})]
|
|
463
|
+
}),
|
|
464
|
+
/* @__PURE__ */ F("div", {
|
|
465
|
+
className: "space-y-2",
|
|
466
|
+
children: [/* @__PURE__ */ P(z, {
|
|
467
|
+
htmlFor: "myb-challenge-end",
|
|
468
|
+
children: n("mybodyshield.community.end", "End")
|
|
469
|
+
}), /* @__PURE__ */ P(R, {
|
|
470
|
+
id: "myb-challenge-end",
|
|
471
|
+
type: "date",
|
|
472
|
+
value: m,
|
|
473
|
+
onChange: (e) => h(e.target.value)
|
|
474
|
+
})]
|
|
475
|
+
}),
|
|
476
|
+
/* @__PURE__ */ F("div", {
|
|
477
|
+
className: "space-y-2",
|
|
478
|
+
children: [/* @__PURE__ */ P(z, {
|
|
479
|
+
htmlFor: "myb-challenge-target",
|
|
480
|
+
children: n("mybodyshield.community.targetSessions", "Target sessions")
|
|
481
|
+
}), /* @__PURE__ */ P(R, {
|
|
482
|
+
id: "myb-challenge-target",
|
|
483
|
+
type: "number",
|
|
484
|
+
inputMode: "numeric",
|
|
485
|
+
min: 1,
|
|
486
|
+
value: u,
|
|
487
|
+
onChange: (e) => d(e.target.value),
|
|
488
|
+
placeholder: n("mybodyshield.community.optional", "Optional")
|
|
489
|
+
})]
|
|
490
|
+
})
|
|
491
|
+
]
|
|
492
|
+
}),
|
|
493
|
+
/* @__PURE__ */ F("div", {
|
|
494
|
+
className: "space-y-2",
|
|
495
|
+
children: [/* @__PURE__ */ P(z, {
|
|
496
|
+
htmlFor: "myb-challenge-desc",
|
|
497
|
+
children: n("mybodyshield.common.description", "Description")
|
|
498
|
+
}), /* @__PURE__ */ P(q, {
|
|
499
|
+
id: "myb-challenge-desc",
|
|
500
|
+
rows: 2,
|
|
501
|
+
value: c,
|
|
502
|
+
onChange: (e) => l(e.target.value)
|
|
503
|
+
})]
|
|
504
|
+
}),
|
|
505
|
+
/* @__PURE__ */ F(U, { children: [/* @__PURE__ */ P(I, {
|
|
506
|
+
type: "button",
|
|
507
|
+
variant: "outline",
|
|
508
|
+
onClick: () => t(!1),
|
|
509
|
+
children: n("mybodyshield.common.cancel", "Cancel")
|
|
510
|
+
}), /* @__PURE__ */ P(I, {
|
|
511
|
+
type: "submit",
|
|
512
|
+
disabled: r.isPending,
|
|
513
|
+
children: n("mybodyshield.common.create", "Create")
|
|
514
|
+
})] })
|
|
515
|
+
]
|
|
516
|
+
})] })
|
|
517
|
+
});
|
|
518
|
+
}
|
|
519
|
+
function ge({ challenge: t }) {
|
|
520
|
+
let n = y(), { currentUser: r } = e(), i = a(t.id);
|
|
521
|
+
if (i.isLoading) return /* @__PURE__ */ P(x, { label: n("mybodyshield.community.loadingBoard", "Loading leaderboard…") });
|
|
522
|
+
if (i.isError) return /* @__PURE__ */ P(b, { message: n("mybodyshield.community.boardError", "Could not load the leaderboard.") });
|
|
523
|
+
let o = i.data ?? [];
|
|
524
|
+
return o.length === 0 ? /* @__PURE__ */ P("p", {
|
|
525
|
+
className: "text-sm text-text-secondary",
|
|
526
|
+
children: n("mybodyshield.community.boardEmpty", "No one has joined yet. Be the first.")
|
|
527
|
+
}) : /* @__PURE__ */ P("ol", {
|
|
528
|
+
className: "space-y-1",
|
|
529
|
+
"data-testid": "myb-leaderboard",
|
|
530
|
+
children: o.map((e) => {
|
|
531
|
+
let i = r?.id === e.memberId, a = i ? n("mybodyshield.community.you", "You") : e.displayName || n("mybodyshield.community.member", "Member"), o = t.targetValue != null && e.value >= t.targetValue;
|
|
532
|
+
return /* @__PURE__ */ F("li", {
|
|
533
|
+
className: `flex items-center justify-between rounded-md px-3 py-2 text-sm ${i ? "bg-status-success-bg" : "bg-bg-subtle"}`,
|
|
534
|
+
children: [/* @__PURE__ */ F("span", {
|
|
535
|
+
className: "flex items-center gap-2 text-text-primary",
|
|
536
|
+
children: [
|
|
537
|
+
/* @__PURE__ */ F("span", {
|
|
538
|
+
className: "w-6 tabular-nums text-text-secondary",
|
|
539
|
+
children: ["#", e.rank]
|
|
540
|
+
}),
|
|
541
|
+
e.rank === 1 && /* @__PURE__ */ P(k, {
|
|
542
|
+
className: "h-4 w-4 text-status-warning-text",
|
|
543
|
+
"aria-hidden": "true"
|
|
544
|
+
}),
|
|
545
|
+
a
|
|
546
|
+
]
|
|
547
|
+
}), /* @__PURE__ */ F("span", {
|
|
548
|
+
className: "tabular-nums text-text-primary",
|
|
549
|
+
children: [
|
|
550
|
+
e.value,
|
|
551
|
+
t.targetValue != null && ` / ${t.targetValue}`,
|
|
552
|
+
" ",
|
|
553
|
+
n("mybodyshield.community.sessions", "sessions"),
|
|
554
|
+
o && /* @__PURE__ */ P(M, {
|
|
555
|
+
className: "ml-1 inline h-4 w-4 text-status-success-text",
|
|
556
|
+
"aria-hidden": "true"
|
|
557
|
+
})
|
|
558
|
+
]
|
|
559
|
+
})]
|
|
560
|
+
}, e.memberId);
|
|
561
|
+
})
|
|
562
|
+
});
|
|
563
|
+
}
|
|
564
|
+
function $({ challenge: e }) {
|
|
565
|
+
let t = y(), r = u(), a = d(), o = i(), [s, c] = E(!1), [l, f] = E(null), p = e.status === "ACTIVE", m = async (e) => {
|
|
566
|
+
f(null);
|
|
567
|
+
try {
|
|
568
|
+
await e();
|
|
569
|
+
} catch (e) {
|
|
570
|
+
f(X(e, t("mybodyshield.community.actionFailed", "Action failed.")));
|
|
571
|
+
}
|
|
572
|
+
};
|
|
573
|
+
return /* @__PURE__ */ F(L, {
|
|
574
|
+
className: "p-4",
|
|
575
|
+
"data-testid": "myb-challenge-card",
|
|
576
|
+
children: [
|
|
577
|
+
/* @__PURE__ */ F("div", {
|
|
578
|
+
className: "flex flex-wrap items-start justify-between gap-3",
|
|
579
|
+
children: [/* @__PURE__ */ F("div", {
|
|
580
|
+
className: "min-w-0",
|
|
581
|
+
children: [
|
|
582
|
+
/* @__PURE__ */ F("div", {
|
|
583
|
+
className: "flex items-center gap-2",
|
|
584
|
+
children: [/* @__PURE__ */ P("h3", {
|
|
585
|
+
className: "font-semibold text-text-primary",
|
|
586
|
+
children: e.title
|
|
587
|
+
}), /* @__PURE__ */ P(n, { status: e.status })]
|
|
588
|
+
}),
|
|
589
|
+
/* @__PURE__ */ F("p", {
|
|
590
|
+
className: "mt-1 text-sm text-text-secondary",
|
|
591
|
+
children: [
|
|
592
|
+
w(e.startDate),
|
|
593
|
+
" – ",
|
|
594
|
+
w(e.endDate),
|
|
595
|
+
" ·",
|
|
596
|
+
" ",
|
|
597
|
+
/* @__PURE__ */ P(ae, {
|
|
598
|
+
className: "inline h-3 w-3",
|
|
599
|
+
"aria-hidden": "true"
|
|
600
|
+
}),
|
|
601
|
+
" ",
|
|
602
|
+
e.participantCount,
|
|
603
|
+
e.targetValue != null && ` · ${t("mybodyshield.community.target", "Target")}: ${e.targetValue} ${t("mybodyshield.community.sessions", "sessions")}`
|
|
604
|
+
]
|
|
605
|
+
}),
|
|
606
|
+
e.description && /* @__PURE__ */ P("p", {
|
|
607
|
+
className: "mt-1 text-sm text-text-primary",
|
|
608
|
+
children: e.description
|
|
609
|
+
})
|
|
610
|
+
]
|
|
611
|
+
}), /* @__PURE__ */ F("div", {
|
|
612
|
+
className: "flex flex-wrap gap-2",
|
|
613
|
+
children: [
|
|
614
|
+
p && (e.isJoined ? /* @__PURE__ */ P(I, {
|
|
615
|
+
variant: "outline",
|
|
616
|
+
size: "sm",
|
|
617
|
+
disabled: a.isPending,
|
|
618
|
+
onClick: () => void m(() => a.mutateAsync(e.id)),
|
|
619
|
+
children: t("mybodyshield.community.leave", "Leave")
|
|
620
|
+
}) : /* @__PURE__ */ P(I, {
|
|
621
|
+
size: "sm",
|
|
622
|
+
disabled: r.isPending,
|
|
623
|
+
onClick: () => void m(() => r.mutateAsync(e.id)),
|
|
624
|
+
children: t("mybodyshield.community.join", "Join")
|
|
625
|
+
})),
|
|
626
|
+
/* @__PURE__ */ F(I, {
|
|
627
|
+
variant: "ghost",
|
|
628
|
+
size: "sm",
|
|
629
|
+
onClick: () => c((e) => !e),
|
|
630
|
+
"aria-expanded": s,
|
|
631
|
+
children: [/* @__PURE__ */ P(M, {
|
|
632
|
+
className: "mr-1 h-4 w-4",
|
|
633
|
+
"aria-hidden": "true"
|
|
634
|
+
}), t("mybodyshield.community.leaderboard", "Leaderboard")]
|
|
635
|
+
}),
|
|
636
|
+
e.isMine && p && /* @__PURE__ */ P(Q, {
|
|
637
|
+
label: t("mybodyshield.community.cancelChallenge", "Cancel challenge"),
|
|
638
|
+
title: t("mybodyshield.community.cancelChallengeTitle", "Cancel this challenge?"),
|
|
639
|
+
description: t("mybodyshield.community.cancelChallengeDescription", "Participants can no longer join, and the leaderboard stops being a running challenge."),
|
|
640
|
+
confirmLabel: t("mybodyshield.community.cancelChallenge", "Cancel challenge"),
|
|
641
|
+
disabled: o.isPending,
|
|
642
|
+
onConfirm: () => void m(() => o.mutateAsync(e.id)),
|
|
643
|
+
children: t("mybodyshield.community.cancelChallenge", "Cancel challenge")
|
|
644
|
+
})
|
|
645
|
+
]
|
|
646
|
+
})]
|
|
647
|
+
}),
|
|
648
|
+
l && /* @__PURE__ */ P("p", {
|
|
649
|
+
className: "mt-2 text-sm text-status-error-text",
|
|
650
|
+
children: l
|
|
651
|
+
}),
|
|
652
|
+
s && /* @__PURE__ */ P("div", {
|
|
653
|
+
className: "mt-3",
|
|
654
|
+
children: /* @__PURE__ */ P(ge, { challenge: e })
|
|
655
|
+
})
|
|
656
|
+
]
|
|
657
|
+
});
|
|
658
|
+
}
|
|
659
|
+
function _e() {
|
|
660
|
+
let e = y(), t = o(), n = J("mybodyshield-challenge:create"), [i, a] = E(!1), s = t.data?.items ?? [], c = s.filter((e) => e.status === "ACTIVE"), l = s.filter((e) => e.status !== "ACTIVE");
|
|
661
|
+
return /* @__PURE__ */ F(S, {
|
|
662
|
+
title: e("mybodyshield.community.challengesTitle", "Challenges"),
|
|
663
|
+
description: e("mybodyshield.community.challengesDescription", "Joining a challenge puts you on its leaderboard. Rankings update from your completed workout sessions."),
|
|
664
|
+
action: n ? /* @__PURE__ */ F(I, {
|
|
665
|
+
onClick: () => a(!0),
|
|
666
|
+
children: [/* @__PURE__ */ P(j, {
|
|
667
|
+
className: "mr-1 h-4 w-4",
|
|
668
|
+
"aria-hidden": "true"
|
|
669
|
+
}), e("mybodyshield.community.newChallenge", "New challenge")]
|
|
670
|
+
}) : void 0,
|
|
671
|
+
children: [t.isLoading ? /* @__PURE__ */ P(x, { label: e("mybodyshield.community.loadingChallenges", "Loading challenges…") }) : t.isError ? /* @__PURE__ */ P(b, {
|
|
672
|
+
message: e("mybodyshield.community.challengesError", "Could not load challenges."),
|
|
673
|
+
onRetry: () => void t.refetch()
|
|
674
|
+
}) : s.length === 0 ? /* @__PURE__ */ P(r, {
|
|
675
|
+
illustration: "empty-data",
|
|
676
|
+
title: e("mybodyshield.community.noChallenges", "No challenges yet"),
|
|
677
|
+
description: e("mybodyshield.community.noChallengesHelp", "Start one — for example, \"most sessions this month\".")
|
|
678
|
+
}) : /* @__PURE__ */ F("div", {
|
|
679
|
+
className: "space-y-3",
|
|
680
|
+
children: [c.map((e) => /* @__PURE__ */ P($, { challenge: e }, e.id)), l.length > 0 && /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ P("h3", {
|
|
681
|
+
className: "pt-2 text-sm font-medium text-text-secondary",
|
|
682
|
+
children: e("mybodyshield.community.pastChallenges", "Past challenges")
|
|
683
|
+
}), l.map((e) => /* @__PURE__ */ P($, { challenge: e }, e.id))] })]
|
|
684
|
+
}), /* @__PURE__ */ P(he, {
|
|
685
|
+
open: i,
|
|
686
|
+
onOpenChange: a
|
|
687
|
+
})]
|
|
688
|
+
});
|
|
689
|
+
}
|
|
690
|
+
function ve() {
|
|
691
|
+
let e = y(), n = p(), [r, i] = E("feed"), a = [
|
|
692
|
+
{
|
|
693
|
+
value: "feed",
|
|
694
|
+
label: e("mybodyshield.community.tabFeed", "Feed"),
|
|
695
|
+
icon: /* @__PURE__ */ P(D, { className: "h-4 w-4" })
|
|
696
|
+
},
|
|
697
|
+
{
|
|
698
|
+
value: "challenges",
|
|
699
|
+
label: e("mybodyshield.community.tabChallenges", "Challenges"),
|
|
700
|
+
icon: /* @__PURE__ */ P(M, { className: "h-4 w-4" })
|
|
701
|
+
},
|
|
702
|
+
{
|
|
703
|
+
value: "privacy",
|
|
704
|
+
label: e("mybodyshield.community.tabPrivacy", "Privacy"),
|
|
705
|
+
icon: /* @__PURE__ */ P(O, { className: "h-4 w-4" })
|
|
706
|
+
}
|
|
707
|
+
];
|
|
708
|
+
return /* @__PURE__ */ F(t, {
|
|
709
|
+
title: e("mybodyshield.community.title", "Community"),
|
|
710
|
+
description: e("mybodyshield.community.description", "Challenges, leaderboards and opt-in sharing inside your workspace."),
|
|
711
|
+
children: [/* @__PURE__ */ P(ee, {
|
|
712
|
+
items: a,
|
|
713
|
+
value: r,
|
|
714
|
+
onChange: i,
|
|
715
|
+
className: "mb-6"
|
|
716
|
+
}), n.isLoading ? /* @__PURE__ */ P(x, { label: e("mybodyshield.community.loading", "Loading community…") }) : n.isError ? /* @__PURE__ */ P(b, {
|
|
717
|
+
message: e("mybodyshield.community.profileError", "Could not load your community profile."),
|
|
718
|
+
onRetry: () => void n.refetch()
|
|
719
|
+
}) : r === "feed" ? /* @__PURE__ */ P(me, { profile: n.data }) : r === "challenges" ? /* @__PURE__ */ P(_e, {}) : /* @__PURE__ */ P(de, { profile: n.data }, `${n.data?.id ?? "new"}:${n.data?.displayName ?? ""}`)]
|
|
720
|
+
});
|
|
721
|
+
}
|
|
722
|
+
export { ve as CommunityPage };
|
|
723
|
+
|
|
724
|
+
//# sourceMappingURL=CommunityPage.js.map
|