mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-06-03 16:38:50 -04:00
improve: Move notifications from redux into context
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
b797f07aa5
commit
03d87f59f8
38 changed files with 362 additions and 376 deletions
|
@ -1,17 +1,17 @@
|
|||
/*
|
||||
SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-only
|
||||
* SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file)
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
import React, { useEffect } from 'react'
|
||||
import type { NextPage } from 'next'
|
||||
import { Trans, useTranslation } from 'react-i18next'
|
||||
import { HistoryToolbar } from '../components/history-page/history-toolbar/history-toolbar'
|
||||
import { safeRefreshHistoryState } from '../redux/history/methods'
|
||||
import { Row } from 'react-bootstrap'
|
||||
import { HistoryContent } from '../components/history-page/history-content/history-content'
|
||||
import { LandingLayout } from '../components/landing-layout/landing-layout'
|
||||
import { HistoryToolbarStateContextProvider } from '../components/history-page/history-toolbar/toolbar-context/history-toolbar-state-context-provider'
|
||||
import { useSafeRefreshHistoryStateCallback } from '../components/history-page/history-toolbar/hooks/use-safe-refresh-history-state'
|
||||
|
||||
/**
|
||||
* The page that shows the local and remote note history.
|
||||
|
@ -19,9 +19,10 @@ import { HistoryToolbarStateContextProvider } from '../components/history-page/h
|
|||
const HistoryPage: NextPage = () => {
|
||||
useTranslation()
|
||||
|
||||
const safeRefreshHistoryStateCallback = useSafeRefreshHistoryStateCallback()
|
||||
useEffect(() => {
|
||||
safeRefreshHistoryState()
|
||||
}, [])
|
||||
safeRefreshHistoryStateCallback()
|
||||
}, [safeRefreshHistoryStateCallback])
|
||||
|
||||
return (
|
||||
<LandingLayout>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue