feat: feature/mvp-sprint-1

This commit is contained in:
Nikolaj Frey 2023-08-15 15:47:10 +10:00
parent 4a9402bb0b
commit 0f1edf9b40

View File

@ -151,20 +151,20 @@ export const ThingtimeProvider = (props: any): JSX.Element => {
// nothing // nothing
} }
// if last undoHistory does not equal new undo history // if last undoHistory does not equal new undo history
console.log( // console.log(
"ThingtimeProvider saving to undo history undoHistory[undoHistory.length - 1]?.value", // "ThingtimeProvider saving to undo history undoHistory[undoHistory.length - 1]?.value",
undoHistory[undoHistory.length - 1]?.value // undoHistory[undoHistory.length - 1]?.value
) // )
console.log( // console.log(
"ThingtimeProvider saving to undo history stringified", // "ThingtimeProvider saving to undo history stringified",
stringified // stringified
) // )
if (undoHistory[undoHistory.length - 1]?.value !== stringified) { if (undoHistory[undoHistory.length - 1]?.value !== stringified) {
try { try {
console.log( // console.log(
"ThingtimeProvider saving to undo history undoHistory", // "ThingtimeProvider saving to undo history undoHistory",
undoHistory // undoHistory
) // )
const limit = newThingtimeReference?.settings?.undoLimit || 999 const limit = newThingtimeReference?.settings?.undoLimit || 999
if (undoHistory?.length > limit) { if (undoHistory?.length > limit) {
@ -206,20 +206,20 @@ export const ThingtimeProvider = (props: any): JSX.Element => {
// nothing // nothing
} }
// if last redoHistory does not equal new redo history // if last redoHistory does not equal new redo history
console.log( // console.log(
"ThingtimeProvider saving to redo history redoHistory[redoHistory.length - 1]?.value", // "ThingtimeProvider saving to redo history redoHistory[redoHistory.length - 1]?.value",
redoHistory[redoHistory.length - 1]?.value // redoHistory[redoHistory.length - 1]?.value
) // )
console.log( // console.log(
"ThingtimeProvider saving to redo history stringified", // "ThingtimeProvider saving to redo history stringified",
stringified // stringified
) // )
if (redoHistory[redoHistory.length - 1]?.value !== stringified) { if (redoHistory[redoHistory.length - 1]?.value !== stringified) {
try { try {
console.log( // console.log(
"ThingtimeProvider saving to redo history redoHistory", // "ThingtimeProvider saving to redo history redoHistory",
redoHistory // redoHistory
) // )
const limit = newThingtimeReference?.settings?.redoLimit || 999 const limit = newThingtimeReference?.settings?.redoLimit || 999
if (redoHistory?.length > limit) { if (redoHistory?.length > limit) {