diff --git a/src/components/ChatInterface.tsx b/src/components/ChatInterface.tsx
index 639797c..ae7c01b 100644
--- a/src/components/ChatInterface.tsx
+++ b/src/components/ChatInterface.tsx
@@ -6,6 +6,7 @@ import ChatSidebar from "./ChatSidebar";
import MobileHeader from "./MobileHeader";
import { useChatStore } from "../stores/chatStore";
import { useChatMigration } from "../hooks/useChatMigration";
+import Clock from "./Clock";
export default function ChatInterface() {
const [isLoading, setIsLoading] = useState(false);
@@ -146,6 +147,9 @@ export default function ChatInterface() {
{activeThread?.title}
+
+
+
diff --git a/src/components/Clock.tsx b/src/components/Clock.tsx
new file mode 100644
index 0000000..ccef490
--- /dev/null
+++ b/src/components/Clock.tsx
@@ -0,0 +1,123 @@
+import { Clock as ClockIcon } from "lucide-react";
+
+function Clock() {
+ let now: any = new Date();
+ let time: any =
+ now.getHours().toString().padStart(2, "0") +
+ ":" +
+ now.getMinutes().toString().padStart(2, "0") +
+ ":" +
+ now.getSeconds().toString().padStart(2, "0");
+
+ let polishMonths: any = [
+ "stycznia",
+ "lutego",
+ "marca",
+ "kwietnia",
+ "maja",
+ "czerwca",
+ "lipca",
+ "sierpnia",
+ "września",
+ "października",
+ "listopada",
+ "grudnia",
+ ];
+ let polishDays: any = ["niedziela", "poniedziałek", "wtorek", "środa", "czwartek", "piątek", "sobota"];
+
+ let dateStr: any =
+ polishDays[now.getDay()] + ", " + now.getDate() + " " + polishMonths[now.getMonth()] + " " + now.getFullYear();
+
+ let timeElement: any;
+ let dateElement: any;
+
+ setTimeout(() => {
+ if (timeElement) {
+ let newNow: any = new Date();
+ timeElement.innerHTML =
+ newNow.getHours().toString().padStart(2, "0") +
+ ":" +
+ newNow.getMinutes().toString().padStart(2, "0") +
+ ":" +
+ newNow.getSeconds().toString().padStart(2, "0");
+ }
+ if (dateElement) {
+ let newNow: any = new Date();
+ dateElement.innerHTML =
+ polishDays[newNow.getDay()] +
+ ", " +
+ newNow.getDate() +
+ " " +
+ polishMonths[newNow.getMonth()] +
+ " " +
+ newNow.getFullYear();
+ }
+ }, 1000);
+
+ setInterval(() => {
+ if (timeElement) {
+ let newNow: any = new Date();
+ timeElement.innerHTML =
+ newNow.getHours().toString().padStart(2, "0") +
+ ":" +
+ newNow.getMinutes().toString().padStart(2, "0") +
+ ":" +
+ newNow.getSeconds().toString().padStart(2, "0");
+ }
+ if (dateElement) {
+ let newNow: any = new Date();
+ dateElement.innerHTML =
+ polishDays[newNow.getDay()] +
+ ", " +
+ newNow.getDate() +
+ " " +
+ polishMonths[newNow.getMonth()] +
+ " " +
+ newNow.getFullYear();
+ }
+ }, 1000);
+
+ return (
+
+
+
+ {
+ timeElement = el;
+ }}>
+ {time}
+
+
+
{
+ dateElement = el;
+ }}
+ style={{
+ fontSize: "12px",
+ color: "#666",
+ fontWeight: "normal",
+ }}>
+ {dateStr}
+
+
+ );
+}
+
+export default Clock;