diff --git a/app/soapbox/features/compose/editor/plugins/floating-block-type-toolbar-plugin.tsx b/app/soapbox/features/compose/editor/plugins/floating-block-type-toolbar-plugin.tsx index cd8afed945..8f5a951c12 100644 --- a/app/soapbox/features/compose/editor/plugins/floating-block-type-toolbar-plugin.tsx +++ b/app/soapbox/features/compose/editor/plugins/floating-block-type-toolbar-plugin.tsx @@ -21,7 +21,7 @@ import { import { useCallback, useEffect, useRef, useState } from 'react'; import * as React from 'react'; import { createPortal } from 'react-dom'; -import { useIntl } from 'react-intl'; +import { defineMessages, useIntl } from 'react-intl'; import { uploadFile } from 'soapbox/actions/compose'; import { useAppDispatch, useInstance } from 'soapbox/hooks'; @@ -34,6 +34,11 @@ import { ToolbarButton } from './floating-text-format-toolbar-plugin'; import type { List as ImmutableList } from 'immutable'; +const messages = defineMessages({ + createHorizontalLine: { id: 'compose_form.lexical.create_horizontal_line', defaultMessage: 'Create horizontal line' }, + uploadMedia: { id: 'compose_form.lexical.upload_media', defaultMessage: 'Upload media' }, +}); + interface IUploadButton { onSelectFile: (src: string) => void } @@ -61,10 +66,6 @@ const UploadButton: React.FC = ({ onSelectFile }) => { fileElement.current?.click(); }; - // if (unavailable) { - // return null; - // } - const src = ( onlyImages(attachmentTypes) ? require('@tabler/icons/photo.svg') @@ -75,7 +76,7 @@ const UploadButton: React.FC = ({ onSelectFile }) => {