livevegas-ui-kit 1.0.99 → 1.0.101

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.
@@ -6538,12 +6538,15 @@ const Xo = ({ tournamentData: e }) => {
6538
6538
  }
6539
6539
  }
6540
6540
  `, p2 = ({ onSendMessage: e, messages: t, isMobile: a = !1 }) => {
6541
- const [i, r] = K(""), { t: s } = G(), o = (c) => {
6542
- const d = c.target.value;
6543
- (d.trim().length || i.length === 1) && r(d);
6541
+ const [i, r] = K(""), { t: s } = G(), o = (u) => {
6542
+ const p = u.target.value;
6543
+ (p.trim().length || i.length === 1) && r(p);
6544
6544
  }, l = () => {
6545
6545
  e(i), r("");
6546
- };
6546
+ }, c = /* @__PURE__ */ new Date(), d = t.filter((u) => {
6547
+ const p = new Date(u.messageDateTime);
6548
+ return (c.getTime() - p.getTime()) / 1e3 < 10;
6549
+ });
6547
6550
  return /* @__PURE__ */ n.jsxs(c2, { $isMobile: a, children: [
6548
6551
  /* @__PURE__ */ n.jsxs(d2, { $isMobile: a, children: [
6549
6552
  /* @__PURE__ */ n.jsx(
@@ -6554,20 +6557,20 @@ const Xo = ({ tournamentData: e }) => {
6554
6557
  onChange: o,
6555
6558
  placeholder: s("Click to chat"),
6556
6559
  type: "text",
6557
- onKeyPress: (c) => {
6558
- c.key === "Enter" && l();
6560
+ onKeyPress: (u) => {
6561
+ u.key === "Enter" && l();
6559
6562
  }
6560
6563
  }
6561
6564
  ),
6562
6565
  /* @__PURE__ */ n.jsx("div", { className: "send-massage", children: /* @__PURE__ */ n.jsx(Ya, { onClick: l }) })
6563
6566
  ] }),
6564
- /* @__PURE__ */ n.jsx(u2, { $isMobile: a, children: t.map((c) => /* @__PURE__ */ n.jsxs("div", { className: "message-item", children: [
6567
+ /* @__PURE__ */ n.jsx(u2, { $isMobile: a, children: d.map((u) => /* @__PURE__ */ n.jsxs("div", { className: "message-item", children: [
6565
6568
  /* @__PURE__ */ n.jsxs("div", { className: "sender-nick", children: [
6566
- /* @__PURE__ */ n.jsx("p", { className: "nickname", children: c.senderNickname }),
6567
- /* @__PURE__ */ n.jsx("p", { className: "time", children: c.time })
6569
+ /* @__PURE__ */ n.jsx("p", { className: "nickname", children: u.senderNickname }),
6570
+ /* @__PURE__ */ n.jsx("p", { className: "time", children: u.time })
6568
6571
  ] }),
6569
- /* @__PURE__ */ n.jsx("p", { className: "masssage", children: c.message })
6570
- ] }, `${c.messageDateTime}`)) })
6572
+ /* @__PURE__ */ n.jsx("p", { className: "masssage", children: u.message })
6573
+ ] }, `${u.messageDateTime}`)) }, d.length)
6571
6574
  ] });
6572
6575
  }, f2 = f.div`
6573
6576
  display: flex;
@@ -1185,7 +1185,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[Tt]+=1);const Sr=f.div`
1185
1185
  opacity: 0;
1186
1186
  }
1187
1187
  }
1188
- `,Fo=({onSendMessage:e,messages:t,isMobile:a=!1})=>{const[i,r]=v.useState(""),{t:s}=G(),o=c=>{const d=c.target.value;(d.trim().length||i.length===1)&&r(d)},l=()=>{e(i),r("")};return n.jsxs(Oo,{$isMobile:a,children:[n.jsxs(Do,{$isMobile:a,children:[n.jsx($o,{$isMobile:a,value:i,onChange:o,placeholder:s("Click to chat"),type:"text",onKeyPress:c=>{c.key==="Enter"&&l()}}),n.jsx("div",{className:"send-massage",children:n.jsx(ka,{onClick:l})})]}),n.jsx(Mo,{$isMobile:a,children:t.map(c=>n.jsxs("div",{className:"message-item",children:[n.jsxs("div",{className:"sender-nick",children:[n.jsx("p",{className:"nickname",children:c.senderNickname}),n.jsx("p",{className:"time",children:c.time})]}),n.jsx("p",{className:"masssage",children:c.message})]},`${c.messageDateTime}`))})]})},Ho=f.div`
1188
+ `,Fo=({onSendMessage:e,messages:t,isMobile:a=!1})=>{const[i,r]=v.useState(""),{t:s}=G(),o=u=>{const p=u.target.value;(p.trim().length||i.length===1)&&r(p)},l=()=>{e(i),r("")},c=new Date,d=t.filter(u=>{const p=new Date(u.messageDateTime);return(c.getTime()-p.getTime())/1e3<10});return n.jsxs(Oo,{$isMobile:a,children:[n.jsxs(Do,{$isMobile:a,children:[n.jsx($o,{$isMobile:a,value:i,onChange:o,placeholder:s("Click to chat"),type:"text",onKeyPress:u=>{u.key==="Enter"&&l()}}),n.jsx("div",{className:"send-massage",children:n.jsx(ka,{onClick:l})})]}),n.jsx(Mo,{$isMobile:a,children:d.map(u=>n.jsxs("div",{className:"message-item",children:[n.jsxs("div",{className:"sender-nick",children:[n.jsx("p",{className:"nickname",children:u.senderNickname}),n.jsx("p",{className:"time",children:u.time})]}),n.jsx("p",{className:"masssage",children:u.message})]},`${u.messageDateTime}`))},d.length)]})},Ho=f.div`
1189
1189
  display: flex;
1190
1190
  flex-direction: column;
1191
1191
  gap: 4px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "livevegas-ui-kit",
3
- "version": "1.0.99",
3
+ "version": "1.0.101",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"