@logora/debate 0.4.91 → 0.4.92

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.
@@ -6,9 +6,9 @@ import t from "./ContentHeader.module.scss.js";
6
6
  import { useRelativeTime as b } from "../../hooks/use_relative_time/useRelativeTime.js";
7
7
  import { useConfig as x } from "../../data/config_provider/useConfig.js";
8
8
  import { Icon as g } from "../../icons/icon/Icon.js";
9
- import { UserBoxSmall as H } from "../../user/user_box_small/UserBoxSmall.js";
10
- import { AuthorBox as w } from "../../user/author_box/AuthorBox.js";
11
- const $ = ({
9
+ import { UserBoxSmall as w } from "../../user/user_box_small/UserBoxSmall.js";
10
+ import { AuthorBox as H } from "../../user/author_box/AuthorBox.js";
11
+ const U = ({
12
12
  author: e,
13
13
  tag: r,
14
14
  tagClassName: _,
@@ -22,7 +22,9 @@ const $ = ({
22
22
  moderationPolicyUrl: m,
23
23
  showModerationFeedback: v = !1
24
24
  }) => {
25
- const M = b(new Date(l).getTime()), n = N(), f = x();
25
+ const M = b(
26
+ Math.min(new Date(l).getTime(), Date.now())
27
+ ), n = N(), f = x();
26
28
  return /* @__PURE__ */ o("div", { className: t.contentHeaderContainer, children: [
27
29
  v && /* @__PURE__ */ o("div", { className: t.moderationInfo, children: [
28
30
  /* @__PURE__ */ o("div", { className: t.moderationReason, children: [
@@ -82,14 +84,14 @@ const $ = ({
82
84
  ] }),
83
85
  /* @__PURE__ */ o("div", { className: t.contentHeader, children: [
84
86
  /* @__PURE__ */ a("div", { className: t.contentHeaderAuthorBox, children: i === !0 ? /* @__PURE__ */ a(
85
- H,
87
+ w,
86
88
  {
87
89
  userName: e.full_name,
88
90
  avatarUrl: e.image_url,
89
91
  userSlug: e.hash_id
90
92
  }
91
93
  ) : /* @__PURE__ */ a(
92
- w,
94
+ H,
93
95
  {
94
96
  fullName: e.full_name,
95
97
  avatarUrl: e.image_url,
@@ -124,5 +126,5 @@ const $ = ({
124
126
  ] });
125
127
  };
126
128
  export {
127
- $ as ContentHeader
129
+ U as ContentHeader
128
130
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logora/debate",
3
- "version": "0.4.91",
3
+ "version": "0.4.92",
4
4
  "type": "module",
5
5
  "license": "AGPL-3.0",
6
6
  "description": "Design system of @Logora made with React",