import React, { useState, useEffect, type FC } from "react"; import ReactDOM from "react-dom/client"; import ReactDesk from "./reactdesk"; import "./index.css"; // import WindowContainer from "./components/WindowContainer"; const ConstantlyUpdatingText: FC = () => { const [value, setValue] = useState("Initial Value"); useEffect(() => { const updateValue = () => { // Generate a new value, for example a timestamp or random number const newValue = `${new Date().toLocaleTimeString()}`; setValue(newValue); }; // Update value every second const intervalId = setInterval(updateValue, 1000); // Cleanup interval on component unmount return () => clearInterval(intervalId); }, []); return (

{value}

); }; // eslint-disable-next-line react-refresh/only-export-components const ReactDeskTest = ( Test ), }, }, ]} /> ); ReactDOM.createRoot(document.getElementById("root")!).render(ReactDeskTest); /* { name: "Arashi", windowContent: ConstantlyUpdatingText, taskbarPin: true, runOnStart: true, windowConfig: { renderTitle: (<>Test ), snap: { type: "threeColumns", index: 0, widthPercent: 100 / 3, heightPercent: 100, }, }, }, { name: "Kaki", windowContent: ConstantlyUpdatingText, taskbarPin: true, runOnStart: true, windowConfig: { snap: { type: "threeColumns", index: 1, widthPercent: 100 / 3, heightPercent: 100, }, }, }, { name: "Pipi", windowContent: ConstantlyUpdatingText, taskbarPin: true, runOnStart: true, windowConfig: { snap: { type: "threeColumns", index: 2, widthPercent: 100 / 3, heightPercent: 100, }, }, }, */