Skip to content

Commit 4b16bcf

Browse files
committed
fix: remove history feature as it affected all data at once
1 parent 3478c10 commit 4b16bcf

File tree

2 files changed

+1
-64
lines changed

2 files changed

+1
-64
lines changed

src/composables/useStateHistory.ts

Lines changed: 0 additions & 48 deletions
This file was deleted.

src/store/state/index.ts

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { useStateHistory, useTime } from '@composables';
1+
import { useTime } from '@composables';
22
import { AvailableLocale, changeLocale } from '@i18n/index';
33
import { Storage } from '@storage/index';
44
import { moveInArrays, readFile, remove, uuid } from '@utils';
@@ -72,21 +72,6 @@ export const createDataStore = (storage?: Storage): Store => {
7272
const state = reactive<DataState>(migrateApplicationState());
7373
const time = useTime();
7474

75-
const history = useStateHistory(
76-
() => state,
77-
(v) => Object.assign(state, v)
78-
);
79-
80-
document.addEventListener('keydown', (evt: KeyboardEvent) => {
81-
if (evt.ctrlKey || evt.metaKey) {
82-
if (evt.code === 'KeyZ') {
83-
history.undo();
84-
} else if (evt.code === 'KeyY') {
85-
history.redo();
86-
}
87-
}
88-
});
89-
9075
const getCurrentYear = () => state.years.find((v) => v.year === activeYear.value) as BudgetYear;
9176

9277
const groups = () => {

0 commit comments

Comments
 (0)