diff --git a/services/web/frontend/extracted-translations.json b/services/web/frontend/extracted-translations.json index 0bbc244b92..a85966ac07 100644 --- a/services/web/frontend/extracted-translations.json +++ b/services/web/frontend/extracted-translations.json @@ -347,6 +347,9 @@ "hide_document_preamble": "", "hide_outline": "", "history": "", + "history_view_a11y_description": "", + "history_view_all": "", + "history_view_labels": "", "hotkey_add_a_comment": "", "hotkey_autocomplete_menu": "", "hotkey_beginning_of_document": "", diff --git a/services/web/frontend/js/features/history/components/change-list/change-list.tsx b/services/web/frontend/js/features/history/components/change-list/change-list.tsx index ed66c4cbbd..f93018de73 100644 --- a/services/web/frontend/js/features/history/components/change-list/change-list.tsx +++ b/services/web/frontend/js/features/history/components/change-list/change-list.tsx @@ -1,15 +1,21 @@ +import usePersistedState from '../../../../shared/hooks/use-persisted-state' import ToggleSwitch from './toggle-switch' import Main from './main' -import { useState } from 'react' +import { useHistoryContext } from '../../context/history-context' function ChangeList() { - // eslint-disable-next-line no-unused-vars - const [labelsOnly, setLabelsOnly] = useState(false) + const { projectId, isError } = useHistoryContext() + const [labelsOnly, setLabelsOnly] = usePersistedState( + `history.userPrefs.showOnlyLabels.${projectId}`, + false + ) return (