time tracking

This commit is contained in:
2024-08-03 05:37:59 +03:00
parent deb7574380
commit 2ae47287a2
19 changed files with 483 additions and 16 deletions

View File

@@ -1,4 +1,7 @@
import {createLazyFileRoute} from "@tanstack/react-router";
import DebouncedNumberInput from "../components/DebouncedNumberInput/DebouncedNumberInput.tsx";
import {useEffect, useState} from "react";
import {isNumber} from "lodash";
export const Route = createLazyFileRoute('/test')({
component: TestPage
@@ -6,9 +9,15 @@ export const Route = createLazyFileRoute('/test')({
function TestPage() {
const [value, setValue] = useState(0);
useEffect(() => {
console.log(`effect: ${value}`)
}, [value]);
return (
<>
<DebouncedNumberInput
onChange={(event) => isNumber(event) && setValue(event)}
/>
</>
);
}