mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-14 15:14:56 -04:00
Move toolbar functions into redux reducer (#1763)
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
a6a2251c88
commit
b30cc5b390
80 changed files with 2481 additions and 2303 deletions
|
@ -6,7 +6,7 @@
|
|||
|
||||
import equal from 'fast-deep-equal'
|
||||
import { useEffect, useRef } from 'react'
|
||||
import { store } from '../../../redux'
|
||||
import { getGlobalState } from '../../../redux'
|
||||
import type { HistoryEntry } from '../../../redux/history/types'
|
||||
import { HistoryEntryOrigin } from '../../../redux/history/types'
|
||||
import { updateLocalHistoryEntry } from '../../../redux/history/methods'
|
||||
|
@ -28,7 +28,7 @@ export const useUpdateLocalHistoryEntry = (updateReady: boolean): void => {
|
|||
if (currentNoteTitle === lastNoteTitle.current && equal(currentNoteTags, lastNoteTags.current)) {
|
||||
return
|
||||
}
|
||||
const history = store.getState().history
|
||||
const history = getGlobalState().history
|
||||
const entry: HistoryEntry = history.find((entry) => entry.identifier === id) ?? {
|
||||
identifier: id,
|
||||
title: '',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue