summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRosyid Haryadi <rosyid_haryadi@protonmail.com>2023-10-01 14:43:01 +0700
committerRosyid Haryadi <rosyid_haryadi@protonmail.com>2023-10-01 14:43:01 +0700
commit1994eefbb9f516e4cc616a347bb2a51d619c457a (patch)
tree8be501edc343dfa181fba18f1c3e22531ce7812a
parent2d1a0042f74a6fe85aa5e408eb1dd3066efbaf72 (diff)
upd default time new entry
-rw-r--r--src/App.jsx7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/App.jsx b/src/App.jsx
index db340da..aa1ae6d 100644
--- a/src/App.jsx
+++ b/src/App.jsx
@@ -13,9 +13,10 @@ import { mdiGitlab } from '@mdi/js';
function App() {
const [baseSalary, setBaseSalary] = useState(0);
+ const initialTime = dayjs().set('hour', 17).set('minute', 30);
const [listEntry, setListEntry] = useState(
[
- {id: 0, date: dayjs(), start: dayjs().set('hour', 17).set('minute', 30), finish: dayjs().set('hour', 18).set('minute', 30)},
+ {id: 0, date: dayjs(), start: initialTime, finish: initialTime},
]
);
const [removeDisabled, setRemoveDisabled] = useState(false);
@@ -47,8 +48,8 @@ function App() {
const newEntry = {
id: getLastId() + 1,
date: dayjs(),
- start: dayjs(),
- finish: dayjs()
+ start: initialTime,
+ finish: initialTime
}
setListEntry((currentList) => [...currentList, newEntry]);
}