diff --git a/frontend/src/components/editor-page/editor-pane/tool-bar/tool-bar.tsx b/frontend/src/components/editor-page/editor-pane/tool-bar/tool-bar.tsx index 258396672..ac98b3e52 100644 --- a/frontend/src/components/editor-page/editor-pane/tool-bar/tool-bar.tsx +++ b/frontend/src/components/editor-page/editor-pane/tool-bar/tool-bar.tsx @@ -1,8 +1,10 @@ /* - * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) + * SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file) * * SPDX-License-Identifier: AGPL-3.0-only */ +import { useMayEdit } from '../../../../hooks/common/use-may-edit' +import { ShowIf } from '../../../common/show-if/show-if' import { BoldButton } from './buttons/bold-button' import { CheckListButton } from './buttons/check-list-button' import { CodeFenceButton } from './buttons/code-fence-button' @@ -33,39 +35,43 @@ const EmojiPickerButton = React.lazy(() => import('./emoji-picker/emoji-picker-b * Renders the toolbar of the editor with buttons for formatting or inserting text. */ export const ToolBar: React.FC = () => { + const mayEdit = useMayEdit() + return ( - - - - - - - - - - - - - - - - - - - - - - - - - - - - - }> - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + }> + + + + + ) }