mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-29 22:35:50 -04:00
Added translation component for history-page title
This commit is contained in:
parent
a87e0a91b0
commit
efb6513205
1 changed files with 4 additions and 2 deletions
|
@ -3,6 +3,7 @@ import {HistoryContent} from './history-content/history-content';
|
||||||
import {HistoryToolbar, HistoryToolbarState, initState as toolbarInitState} from './history-toolbar/history-toolbar';
|
import {HistoryToolbar, HistoryToolbarState, initState as toolbarInitState} from './history-toolbar/history-toolbar';
|
||||||
import {loadHistoryFromLocalStore, sortAndFilterEntries} from "../../../../utils/historyUtils";
|
import {loadHistoryFromLocalStore, sortAndFilterEntries} from "../../../../utils/historyUtils";
|
||||||
import {Row} from 'react-bootstrap';
|
import {Row} from 'react-bootstrap';
|
||||||
|
import {Trans, useTranslation} from "react-i18next";
|
||||||
|
|
||||||
export interface HistoryEntry {
|
export interface HistoryEntry {
|
||||||
id: string,
|
id: string,
|
||||||
|
@ -15,6 +16,7 @@ export interface HistoryEntry {
|
||||||
export type pinClick = (entryId: string) => void;
|
export type pinClick = (entryId: string) => void;
|
||||||
|
|
||||||
export const History: React.FC = () => {
|
export const History: React.FC = () => {
|
||||||
|
useTranslation();
|
||||||
const [historyEntries, setHistoryEntries] = useState<HistoryEntry[]>([])
|
const [historyEntries, setHistoryEntries] = useState<HistoryEntry[]>([])
|
||||||
const [viewState, setViewState] = useState<HistoryToolbarState>(toolbarInitState)
|
const [viewState, setViewState] = useState<HistoryToolbarState>(toolbarInitState)
|
||||||
|
|
||||||
|
@ -53,7 +55,7 @@ export const History: React.FC = () => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<h1>History</h1>
|
<h1 className="mb-4"><Trans i18nKey="history"/></h1>
|
||||||
<Row className={"justify-content-center mb-3"}>
|
<Row className={"justify-content-center mb-3"}>
|
||||||
<HistoryToolbar onSettingsChange={setViewState} tags={tags}/>
|
<HistoryToolbar onSettingsChange={setViewState} tags={tags}/>
|
||||||
</Row>
|
</Row>
|
||||||
|
@ -62,4 +64,4 @@ export const History: React.FC = () => {
|
||||||
onPinClick={pinClick}/>
|
onPinClick={pinClick}/>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue