diff --git a/webapp/src/app.tsx b/webapp/src/app.tsx index 794584fe3..2b1934eb1 100644 --- a/webapp/src/app.tsx +++ b/webapp/src/app.tsx @@ -42,7 +42,7 @@ declare let window: IAppWindow const UUID_REGEX = new RegExp(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/) -const App = React.memo((): JSX.Element => { +const App = (): JSX.Element => { const language = useAppSelector(getLanguage) const loggedIn = useAppSelector(getLoggedIn) const globalError = useAppSelector(getGlobalError) @@ -277,6 +277,6 @@ const App = React.memo((): JSX.Element => { ) -}) +} -export default App +export default React.memo(App) diff --git a/webapp/src/components/addContentMenuItem.tsx b/webapp/src/components/addContentMenuItem.tsx index 434715300..1e121b641 100644 --- a/webapp/src/components/addContentMenuItem.tsx +++ b/webapp/src/components/addContentMenuItem.tsx @@ -18,7 +18,7 @@ type Props = { cords: {x: number, y?: number, z?: number} } -const AddContentMenuItem = React.memo((props:Props): JSX.Element => { +const AddContentMenuItem = (props:Props): JSX.Element => { const {card, type, cords} = props const index = cords.x const contentOrder = card.fields.contentOrder.slice() @@ -51,6 +51,6 @@ const AddContentMenuItem = React.memo((props:Props): JSX.Element => { }} /> ) -}) +} -export default AddContentMenuItem +export default React.memo(AddContentMenuItem) diff --git a/webapp/src/components/blockIconSelector.tsx b/webapp/src/components/blockIconSelector.tsx index 0f95ee4dd..f404f9bdd 100644 --- a/webapp/src/components/blockIconSelector.tsx +++ b/webapp/src/components/blockIconSelector.tsx @@ -20,7 +20,7 @@ type Props = { readonly?: boolean } -const BlockIconSelector = React.memo((props: Props) => { +const BlockIconSelector = (props: Props) => { const {block, size} = props const intl = useIntl() @@ -72,6 +72,6 @@ const BlockIconSelector = React.memo((props: Props) => { } ) -}) +} -export default BlockIconSelector +export default React.memo(BlockIconSelector) diff --git a/webapp/src/components/boardTemplateSelector/boardTemplateSelector.tsx b/webapp/src/components/boardTemplateSelector/boardTemplateSelector.tsx index 329c49150..e680128e7 100644 --- a/webapp/src/components/boardTemplateSelector/boardTemplateSelector.tsx +++ b/webapp/src/components/boardTemplateSelector/boardTemplateSelector.tsx @@ -27,7 +27,7 @@ type Props = { onClose?: () => void } -const BoardTemplateSelector = React.memo((props: Props) => { +const BoardTemplateSelector = (props: Props) => { const globalTemplates = useAppSelector(getGlobalTemplates) || [] const currentBoard = useAppSelector(getCurrentBoard) || null const {title, description, onClose} = props @@ -166,7 +166,6 @@ const BoardTemplateSelector = React.memo((props: Props) => { ) -}) - -export default BoardTemplateSelector +} +export default React.memo(BoardTemplateSelector) diff --git a/webapp/src/components/boardTemplateSelector/boardTemplateSelectorItem.tsx b/webapp/src/components/boardTemplateSelector/boardTemplateSelectorItem.tsx index f5d0fac12..0d0899b04 100644 --- a/webapp/src/components/boardTemplateSelector/boardTemplateSelectorItem.tsx +++ b/webapp/src/components/boardTemplateSelector/boardTemplateSelectorItem.tsx @@ -19,7 +19,7 @@ type Props = { onEdit: (templateId: string) => void } -const BoardTemplateSelectorItem = React.memo((props: Props) => { +const BoardTemplateSelectorItem = (props: Props) => { const {isActive, template, onEdit, onDelete, onSelect} = props const intl = useIntl() const [deleteOpen, setDeleteOpen] = useState(false) @@ -65,6 +65,6 @@ const BoardTemplateSelectorItem = React.memo((props: Props) => { />} ) -}) +} -export default BoardTemplateSelectorItem +export default React.memo(BoardTemplateSelectorItem) diff --git a/webapp/src/components/boardTemplateSelector/boardTemplateSelectorPreview.tsx b/webapp/src/components/boardTemplateSelector/boardTemplateSelectorPreview.tsx index acfb25ad5..02d8314cb 100644 --- a/webapp/src/components/boardTemplateSelector/boardTemplateSelectorPreview.tsx +++ b/webapp/src/components/boardTemplateSelector/boardTemplateSelectorPreview.tsx @@ -21,7 +21,7 @@ type Props = { activeTemplate: Board|null } -const BoardTemplateSelectorPreview = React.memo((props: Props) => { +const BoardTemplateSelectorPreview = (props: Props) => { const {activeTemplate} = props const [activeView, setActiveView] = useState(null) const [activeTemplateCards, setActiveTemplateCards] = useState([]) @@ -137,7 +137,7 @@ const BoardTemplateSelectorPreview = React.memo((props: Props) => { />} ) -}) +} -export default BoardTemplateSelectorPreview +export default React.memo(BoardTemplateSelectorPreview) diff --git a/webapp/src/components/cardDetail/cardDetailContents.tsx b/webapp/src/components/cardDetail/cardDetailContents.tsx index 3b1eb6467..4c2d00adf 100644 --- a/webapp/src/components/cardDetail/cardDetailContents.tsx +++ b/webapp/src/components/cardDetail/cardDetailContents.tsx @@ -147,7 +147,7 @@ const ContentBlockWithDragAndDrop = (props: ContentBlockWithDragAndDropProps) => ) } -const CardDetailContents = React.memo((props: Props) => { +const CardDetailContents = (props: Props) => { const intl = useIntl() const {contents, card, id} = props if (contents.length) { @@ -188,6 +188,6 @@ const CardDetailContents = React.memo((props: Props) => { ) -}) +} -export default CardDetailContents +export default React.memo(CardDetailContents) diff --git a/webapp/src/components/cardDetail/cardDetailContentsMenu.tsx b/webapp/src/components/cardDetail/cardDetailContentsMenu.tsx index ee11c4165..ed1bc1690 100644 --- a/webapp/src/components/cardDetail/cardDetailContentsMenu.tsx +++ b/webapp/src/components/cardDetail/cardDetailContentsMenu.tsx @@ -37,7 +37,7 @@ function addContentMenu(intl: IntlShape, type: BlockTypes): JSX.Element { ) } -const CardDetailContentsMenu = React.memo(() => { +const CardDetailContentsMenu = () => { const intl = useIntl() return (
@@ -54,6 +54,6 @@ const CardDetailContentsMenu = React.memo(() => {
) -}) +} -export default CardDetailContentsMenu +export default React.memo(CardDetailContentsMenu) diff --git a/webapp/src/components/cardDetail/cardDetailProperties.tsx b/webapp/src/components/cardDetail/cardDetailProperties.tsx index f21f2af69..0b096ce20 100644 --- a/webapp/src/components/cardDetail/cardDetailProperties.tsx +++ b/webapp/src/components/cardDetail/cardDetailProperties.tsx @@ -32,7 +32,7 @@ type Props = { readonly: boolean } -const CardDetailProperties = React.memo((props: Props) => { +const CardDetailProperties = (props: Props) => { const {board, card, cards, views, activeView, contents, comments} = props const [newTemplateId, setNewTemplateId] = useState('') const intl = useIntl() @@ -202,6 +202,6 @@ const CardDetailProperties = React.memo((props: Props) => { } ) -}) +} -export default CardDetailProperties +export default React.memo(CardDetailProperties) diff --git a/webapp/src/components/cardDetail/commentsList.tsx b/webapp/src/components/cardDetail/commentsList.tsx index 86017196a..df64a6847 100644 --- a/webapp/src/components/cardDetail/commentsList.tsx +++ b/webapp/src/components/cardDetail/commentsList.tsx @@ -24,7 +24,7 @@ type Props = { readonly: boolean } -const CommentsList = React.memo((props: Props) => { +const CommentsList = (props: Props) => { const [newComment, setNewComment] = useState('') const me = useAppSelector(getMe) @@ -97,6 +97,6 @@ const CommentsList = React.memo((props: Props) => { {!(comments.length === 0 && props.readonly) &&
} ) -}) +} -export default CommentsList +export default React.memo(CommentsList) diff --git a/webapp/src/components/content/checkboxElement.tsx b/webapp/src/components/content/checkboxElement.tsx index c86602eea..15955a546 100644 --- a/webapp/src/components/content/checkboxElement.tsx +++ b/webapp/src/components/content/checkboxElement.tsx @@ -21,7 +21,7 @@ type Props = { onDeleteElement?: () => void } -const CheckboxElement = React.memo((props: Props) => { +const CheckboxElement = (props: Props) => { const {block, readonly} = props const intl = useIntl() const titleRef = useRef(null) @@ -83,7 +83,7 @@ const CheckboxElement = React.memo((props: Props) => { /> ) -}) +} contentRegistry.registerContentType({ type: 'checkbox', @@ -104,4 +104,4 @@ contentRegistry.registerContentType({ }, }) -export default CheckboxElement +export default React.memo(CheckboxElement) diff --git a/webapp/src/components/content/dividerElement.tsx b/webapp/src/components/content/dividerElement.tsx index 11c3dca94..cc7c1cad9 100644 --- a/webapp/src/components/content/dividerElement.tsx +++ b/webapp/src/components/content/dividerElement.tsx @@ -8,7 +8,7 @@ import DividerIcon from '../../widgets/icons/divider' import {contentRegistry} from './contentRegistry' import './dividerElement.scss' -const DividerElement = React.memo((): JSX.Element =>
) +const DividerElement = (): JSX.Element =>
contentRegistry.registerContentType({ type: 'divider', @@ -20,4 +20,4 @@ contentRegistry.registerContentType({ createComponent: () => , }) -export default DividerElement +export default React.memo(DividerElement) diff --git a/webapp/src/components/content/imageElement.tsx b/webapp/src/components/content/imageElement.tsx index ffdc8eb8e..a687102fe 100644 --- a/webapp/src/components/content/imageElement.tsx +++ b/webapp/src/components/content/imageElement.tsx @@ -14,7 +14,7 @@ type Props = { block: ContentBlock } -const ImageElement = React.memo((props: Props): JSX.Element|null => { +const ImageElement = (props: Props): JSX.Element|null => { const [imageDataUrl, setImageDataUrl] = useState(null) const {block} = props @@ -40,7 +40,7 @@ const ImageElement = React.memo((props: Props): JSX.Element|null => { alt={block.title} /> ) -}) +} contentRegistry.registerContentType({ type: 'image', @@ -65,4 +65,4 @@ contentRegistry.registerContentType({ createComponent: (block) => , }) -export default ImageElement +export default React.memo(ImageElement) diff --git a/webapp/src/components/content/textElement.tsx b/webapp/src/components/content/textElement.tsx index 73955fe51..beef17a7a 100644 --- a/webapp/src/components/content/textElement.tsx +++ b/webapp/src/components/content/textElement.tsx @@ -16,7 +16,7 @@ type Props = { readonly: boolean } -const TextElement = React.memo((props: Props): JSX.Element => { +const TextElement = (props: Props): JSX.Element => { const {block, readonly} = props const intl = useIntl() @@ -32,7 +32,7 @@ const TextElement = React.memo((props: Props): JSX.Element => { readonly={readonly} /> ) -}) +} contentRegistry.registerContentType({ type: 'text', @@ -51,4 +51,4 @@ contentRegistry.registerContentType({ }, }) -export default TextElement +export default React.memo(TextElement) diff --git a/webapp/src/components/contentBlock.tsx b/webapp/src/components/contentBlock.tsx index 718d2e81e..f2de21e5b 100644 --- a/webapp/src/components/contentBlock.tsx +++ b/webapp/src/components/contentBlock.tsx @@ -34,7 +34,7 @@ type Props = { cords: {x: number, y?: number, z?: number} } -const ContentBlock = React.memo((props: Props): JSX.Element => { +const ContentBlock = (props: Props): JSX.Element => { const {card, block, readonly, cords} = props const intl = useIntl() const [, , gripRef, itemRef] = useSortableWithGrip('content', {block, cords}, true, () => {}) @@ -158,6 +158,6 @@ const ContentBlock = React.memo((props: Props): JSX.Element => { />
) -}) +} -export default ContentBlock +export default React.memo(ContentBlock) diff --git a/webapp/src/components/dialog.tsx b/webapp/src/components/dialog.tsx index 151a2df4e..8d7642ded 100644 --- a/webapp/src/components/dialog.tsx +++ b/webapp/src/components/dialog.tsx @@ -20,7 +20,7 @@ type Props = { onClose: () => void, } -const Dialog = React.memo((props: Props) => { +const Dialog = (props: Props) => { const {toolsMenu} = props const {toolbar, title} = props const intl = useIntl() @@ -73,6 +73,6 @@ const Dialog = React.memo((props: Props) => {
) -}) +} -export default Dialog +export default React.memo(Dialog) diff --git a/webapp/src/components/gallery/galleryCard.tsx b/webapp/src/components/gallery/galleryCard.tsx index d7f11a6b1..b0017b319 100644 --- a/webapp/src/components/gallery/galleryCard.tsx +++ b/webapp/src/components/gallery/galleryCard.tsx @@ -42,7 +42,7 @@ type Props = { onDrop: (srcCard: Card, dstCard: Card) => void } -const GalleryCard = React.memo((props: Props) => { +const GalleryCard = (props: Props) => { const {card, board} = props const intl = useIntl() const [isDragging, isOver, cardRef] = useSortable('card', card, props.isManualSort && !props.readonly, props.onDrop) @@ -185,6 +185,6 @@ const GalleryCard = React.memo((props: Props) => { />} ) -}) +} -export default GalleryCard +export default React.memo(GalleryCard) diff --git a/webapp/src/components/globalHeader/globalHeaderSettingsMenu.tsx b/webapp/src/components/globalHeader/globalHeaderSettingsMenu.tsx index 160215afc..28030370b 100644 --- a/webapp/src/components/globalHeader/globalHeaderSettingsMenu.tsx +++ b/webapp/src/components/globalHeader/globalHeaderSettingsMenu.tsx @@ -17,7 +17,7 @@ import TelemetryClient, {TelemetryCategory, TelemetryActions} from '../../teleme import './globalHeaderSettingsMenu.scss' -const GlobalHeaderSettingsMenu = React.memo(() => { +const GlobalHeaderSettingsMenu = () => { const intl = useIntl() const dispatch = useAppDispatch() @@ -96,6 +96,6 @@ const GlobalHeaderSettingsMenu = React.memo(() => { ) -}) +} -export default GlobalHeaderSettingsMenu +export default React.memo(GlobalHeaderSettingsMenu) diff --git a/webapp/src/components/kanban/kanbanCard.tsx b/webapp/src/components/kanban/kanbanCard.tsx index 494fcbf62..57dfcbc02 100644 --- a/webapp/src/components/kanban/kanbanCard.tsx +++ b/webapp/src/components/kanban/kanbanCard.tsx @@ -40,7 +40,7 @@ type Props = { isManualSort: boolean } -const KanbanCard = React.memo((props: Props) => { +const KanbanCard = (props: Props) => { const {card, board} = props const intl = useIntl() const [isDragging, isOver, cardRef] = useSortable('card', card, !props.readonly, props.onDrop) @@ -174,6 +174,6 @@ const KanbanCard = React.memo((props: Props) => { ) -}) +} -export default KanbanCard +export default React.memo(KanbanCard) diff --git a/webapp/src/components/kanban/kanbanColumn.tsx b/webapp/src/components/kanban/kanbanColumn.tsx index 069811f89..d5924cfbe 100644 --- a/webapp/src/components/kanban/kanbanColumn.tsx +++ b/webapp/src/components/kanban/kanbanColumn.tsx @@ -11,7 +11,7 @@ type Props = { children: React.ReactNode } -const KanbanColumn = React.memo((props: Props) => { +const KanbanColumn = (props: Props) => { const [{isOver}, drop] = useDrop(() => ({ accept: 'card', collect: (monitor) => ({ @@ -36,6 +36,6 @@ const KanbanColumn = React.memo((props: Props) => { {props.children} ) -}) +} -export default KanbanColumn +export default React.memo(KanbanColumn) diff --git a/webapp/src/components/modal.tsx b/webapp/src/components/modal.tsx index c83dbf525..a66da1857 100644 --- a/webapp/src/components/modal.tsx +++ b/webapp/src/components/modal.tsx @@ -12,7 +12,7 @@ type Props = { children: React.ReactNode } -const Modal = React.memo((props: Props): JSX.Element => { +const Modal = (props: Props): JSX.Element => { const node = useRef(null) const {position, onClose, children} = props @@ -47,6 +47,6 @@ const Modal = React.memo((props: Props): JSX.Element => { {children} ) -}) +} -export default Modal +export default React.memo(Modal) diff --git a/webapp/src/components/modalWrapper.tsx b/webapp/src/components/modalWrapper.tsx index b8cc1c209..e344fc8bd 100644 --- a/webapp/src/components/modalWrapper.tsx +++ b/webapp/src/components/modalWrapper.tsx @@ -7,12 +7,12 @@ type Props = { children: React.ReactNode } -const ModalWrapper = React.memo((props: Props) => { +const ModalWrapper = (props: Props) => { return (
{props.children}
) -}) +} -export default ModalWrapper +export default React.memo(ModalWrapper) diff --git a/webapp/src/components/properties/select/select.tsx b/webapp/src/components/properties/select/select.tsx index 8560e7838..74b48a379 100644 --- a/webapp/src/components/properties/select/select.tsx +++ b/webapp/src/components/properties/select/select.tsx @@ -20,7 +20,7 @@ type Props = { isEditable: boolean } -const SelectProperty = React.memo((props: Props) => { +const SelectProperty = (props: Props) => { const {emptyValue, propertyValue, propertyTemplate, isEditable} = props const [open, setOpen] = useState(false) @@ -56,6 +56,6 @@ const SelectProperty = React.memo((props: Props) => { onBlur={() => setOpen(false)} /> ) -}) +} -export default SelectProperty +export default React.memo(SelectProperty) diff --git a/webapp/src/components/rootPortal.tsx b/webapp/src/components/rootPortal.tsx index 5e17db6f5..5c930a8d6 100644 --- a/webapp/src/components/rootPortal.tsx +++ b/webapp/src/components/rootPortal.tsx @@ -8,7 +8,7 @@ type Props = { children: React.ReactNode } -const RootPortal = React.memo((props: Props): JSX.Element => { +const RootPortal = (props: Props): JSX.Element => { const [el] = useState(document.createElement('div')) const rootPortal = document.getElementById('focalboard-root-portal') @@ -24,6 +24,6 @@ const RootPortal = React.memo((props: Props): JSX.Element => { }, []) return ReactDOM.createPortal(props.children, el) // eslint-disable-line -}) +} -export default RootPortal +export default React.memo(RootPortal) diff --git a/webapp/src/components/shareBoard/shareBoardButton.tsx b/webapp/src/components/shareBoard/shareBoardButton.tsx index 4e7ec1475..ef1aaa055 100644 --- a/webapp/src/components/shareBoard/shareBoardButton.tsx +++ b/webapp/src/components/shareBoard/shareBoardButton.tsx @@ -16,7 +16,7 @@ import ShareBoardDialog from './shareBoard' type Props = { boardId: string } -const ShareBoardButton = React.memo((props: Props) => { +const ShareBoardButton = (props: Props) => { const [showShareDialog, setShowShareDialog] = useState(false) return ( @@ -47,6 +47,6 @@ const ShareBoardButton = React.memo((props: Props) => { } ) -}) +} -export default ShareBoardButton +export default React.memo(ShareBoardButton) diff --git a/webapp/src/components/sidebar/registrationLink.tsx b/webapp/src/components/sidebar/registrationLink.tsx index 172d8fbe2..fc0d46b71 100644 --- a/webapp/src/components/sidebar/registrationLink.tsx +++ b/webapp/src/components/sidebar/registrationLink.tsx @@ -19,7 +19,7 @@ type Props = { onClose: () => void } -const RegistrationLink = React.memo((props: Props) => { +const RegistrationLink = (props: Props) => { const {onClose} = props const intl = useIntl() const workspace = useAppSelector(getCurrentWorkspace) @@ -89,6 +89,6 @@ const RegistrationLink = React.memo((props: Props) => { ) -}) +} -export default RegistrationLink +export default React.memo(RegistrationLink) diff --git a/webapp/src/components/sidebar/sidebar.tsx b/webapp/src/components/sidebar/sidebar.tsx index 35a5c8d3f..97aea8d22 100644 --- a/webapp/src/components/sidebar/sidebar.tsx +++ b/webapp/src/components/sidebar/sidebar.tsx @@ -39,7 +39,7 @@ function getWindowDimensions() { } } -const Sidebar = React.memo((props: Props) => { +const Sidebar = (props: Props) => { const [isHidden, setHidden] = useState(false) const [userHidden, setUserHidden] = useState(false) const [windowDimensions, setWindowDimensions] = useState(getWindowDimensions()) @@ -209,6 +209,6 @@ const Sidebar = React.memo((props: Props) => { } ) -}) +} -export default Sidebar +export default React.memo(Sidebar) diff --git a/webapp/src/components/sidebar/sidebarBoardItem.tsx b/webapp/src/components/sidebar/sidebarBoardItem.tsx index d1e5622d1..e751d638e 100644 --- a/webapp/src/components/sidebar/sidebarBoardItem.tsx +++ b/webapp/src/components/sidebar/sidebarBoardItem.tsx @@ -33,7 +33,7 @@ type Props = { hideSidebar: () => void } -const SidebarBoardItem = React.memo((props: Props) => { +const SidebarBoardItem = (props: Props) => { const [collapsed, setCollapsed] = useState(false) const intl = useIntl() const history = useHistory() @@ -207,6 +207,6 @@ const SidebarBoardItem = React.memo((props: Props) => { />} ) -}) +} -export default SidebarBoardItem +export default React.memo(SidebarBoardItem) diff --git a/webapp/src/components/sidebar/sidebarSettingsMenu.tsx b/webapp/src/components/sidebar/sidebarSettingsMenu.tsx index 46b9767f4..02fcf4c17 100644 --- a/webapp/src/components/sidebar/sidebarSettingsMenu.tsx +++ b/webapp/src/components/sidebar/sidebarSettingsMenu.tsx @@ -30,7 +30,7 @@ type Props = { activeTheme: string } -const SidebarSettingsMenu = React.memo((props: Props) => { +const SidebarSettingsMenu = (props: Props) => { const intl = useIntl() const dispatch = useAppDispatch() @@ -164,6 +164,6 @@ const SidebarSettingsMenu = React.memo((props: Props) => { ) -}) +} -export default SidebarSettingsMenu +export default React.memo(SidebarSettingsMenu) diff --git a/webapp/src/components/sidebar/sidebarUserMenu.tsx b/webapp/src/components/sidebar/sidebarUserMenu.tsx index 9dfe31da2..be031600f 100644 --- a/webapp/src/components/sidebar/sidebarUserMenu.tsx +++ b/webapp/src/components/sidebar/sidebarUserMenu.tsx @@ -25,7 +25,7 @@ import './sidebarUserMenu.scss' declare let window: IAppWindow -const SidebarUserMenu = React.memo(() => { +const SidebarUserMenu = () => { const history = useHistory() const [showRegistrationLinkDialog, setShowRegistrationLinkDialog] = useState(false) const user = useAppSelector(getMe) @@ -106,6 +106,6 @@ const SidebarUserMenu = React.memo(() => { ) -}) +} -export default SidebarUserMenu +export default React.memo(SidebarUserMenu) diff --git a/webapp/src/components/table/horizontalGrip.tsx b/webapp/src/components/table/horizontalGrip.tsx index 67e3ea1ee..8c5dd9a9f 100644 --- a/webapp/src/components/table/horizontalGrip.tsx +++ b/webapp/src/components/table/horizontalGrip.tsx @@ -10,7 +10,7 @@ type Props = { onAutoSizeColumn: (columnID: string) => void; } -const HorizontalGrip = React.memo((props: Props): JSX.Element => { +const HorizontalGrip = (props: Props): JSX.Element => { const [, drag] = useDrag(() => ({ type: 'horizontalGrip', item: {id: props.templateId}, @@ -23,6 +23,6 @@ const HorizontalGrip = React.memo((props: Props): JSX.Element => { onDoubleClick={() => props.onAutoSizeColumn(props.templateId)} /> ) -}) +} -export default HorizontalGrip +export default React.memo(HorizontalGrip) diff --git a/webapp/src/components/table/tableGroup.tsx b/webapp/src/components/table/tableGroup.tsx index 6c9b5845b..90453fb74 100644 --- a/webapp/src/components/table/tableGroup.tsx +++ b/webapp/src/components/table/tableGroup.tsx @@ -31,7 +31,7 @@ type Props = { onDropToGroup: (srcCard: Card, groupID: string, dstCardID: string) => void } -const TableGroup = React.memo((props: Props): JSX.Element => { +const TableGroup = (props: Props): JSX.Element => { const {board, activeView, group, onDropToGroup, groupByProperty} = props const groupId = group.option.id @@ -86,6 +86,6 @@ const TableGroup = React.memo((props: Props): JSX.Element => { />} ) -}) +} -export default TableGroup +export default React.memo(TableGroup) diff --git a/webapp/src/components/table/tableGroupHeaderRow.tsx b/webapp/src/components/table/tableGroupHeaderRow.tsx index 715a9ed0d..ced304689 100644 --- a/webapp/src/components/table/tableGroupHeaderRow.tsx +++ b/webapp/src/components/table/tableGroupHeaderRow.tsx @@ -33,7 +33,7 @@ type Props = { onDrop: (srcOption: IPropertyOption, dstOption?: IPropertyOption) => void } -const TableGroupHeaderRow = React.memo((props: Props): JSX.Element => { +const TableGroupHeaderRow = (props: Props): JSX.Element => { const {board, activeView, group, groupByProperty} = props const [groupTitle, setGroupTitle] = useState(group.option.value) @@ -147,6 +147,6 @@ const TableGroupHeaderRow = React.memo((props: Props): JSX.Element => { } ) -}) +} -export default TableGroupHeaderRow +export default React.memo(TableGroupHeaderRow) diff --git a/webapp/src/components/table/tableHeader.tsx b/webapp/src/components/table/tableHeader.tsx index 6eee6fbd0..b7bc32b45 100644 --- a/webapp/src/components/table/tableHeader.tsx +++ b/webapp/src/components/table/tableHeader.tsx @@ -32,7 +32,7 @@ type Props = { onAutoSizeColumn: (columnID: string, headerWidth: number) => void } -const TableHeader = React.memo((props: Props): JSX.Element => { +const TableHeader = (props: Props): JSX.Element => { const [isDragging, isOver, columnRef] = useSortable('column', props.template, !props.readonly, props.onDrop) const columnWidth = (templateId: string): number => { @@ -85,6 +85,6 @@ const TableHeader = React.memo((props: Props): JSX.Element => { } ) -}) +} -export default TableHeader +export default React.memo(TableHeader) diff --git a/webapp/src/components/table/tableRow.tsx b/webapp/src/components/table/tableRow.tsx index 1e4cab5dd..5e0b8510b 100644 --- a/webapp/src/components/table/tableRow.tsx +++ b/webapp/src/components/table/tableRow.tsx @@ -43,7 +43,7 @@ export const columnWidth = (resizingColumn: string, columnWidths: Record { +const TableRow = (props: Props) => { const {board, activeView, onSaveWithEnter, columnRefs, card} = props const contents = useAppSelector(getCardContents(card.id || '')) const comments = useAppSelector(getCardComments(card.id)) @@ -150,6 +150,6 @@ const TableRow = React.memo((props: Props) => { })} ) -}) +} -export default TableRow +export default React.memo(TableRow) diff --git a/webapp/src/components/topBar.tsx b/webapp/src/components/topBar.tsx index 9e6f1b8ee..22d4b1ce2 100644 --- a/webapp/src/components/topBar.tsx +++ b/webapp/src/components/topBar.tsx @@ -10,7 +10,7 @@ import HelpIcon from '../widgets/icons/help' import {Utils} from '../utils' import {Constants} from '../constants' -const TopBar = React.memo((): JSX.Element => { +const TopBar = (): JSX.Element => { if (Utils.isFocalboardPlugin()) { const feedbackUrl = 'https://www.focalboard.com/fwlink/feedback-boards.html?v=' + Constants.versionString return ( @@ -65,6 +65,6 @@ const TopBar = React.memo((): JSX.Element => { ) -}) +} -export default TopBar +export default React.memo(TopBar) diff --git a/webapp/src/components/viewHeader/emptyCardButton.tsx b/webapp/src/components/viewHeader/emptyCardButton.tsx index b58221881..4b1742d77 100644 --- a/webapp/src/components/viewHeader/emptyCardButton.tsx +++ b/webapp/src/components/viewHeader/emptyCardButton.tsx @@ -20,7 +20,7 @@ type Props = { addCard: () => void } -const EmptyCardButton = React.memo((props: Props) => { +const EmptyCardButton = (props: Props) => { const currentView = useAppSelector(getCurrentView) const intl = useIntl() @@ -52,6 +52,6 @@ const EmptyCardButton = React.memo((props: Props) => { } />) -}) +} -export default EmptyCardButton +export default React.memo(EmptyCardButton) diff --git a/webapp/src/components/viewHeader/filterComponent.tsx b/webapp/src/components/viewHeader/filterComponent.tsx index 4254a3176..aebe9e30a 100644 --- a/webapp/src/components/viewHeader/filterComponent.tsx +++ b/webapp/src/components/viewHeader/filterComponent.tsx @@ -23,7 +23,7 @@ type Props = { onClose: () => void } -const FilterComponent = React.memo((props: Props): JSX.Element => { +const FilterComponent = (props: Props): JSX.Element => { const conditionClicked = (optionId: string, filter: FilterClause): void => { const {activeView} = props @@ -91,6 +91,6 @@ const FilterComponent = React.memo((props: Props): JSX.Element => { ) -}) +} -export default FilterComponent +export default React.memo(FilterComponent) diff --git a/webapp/src/components/viewHeader/filterEntry.tsx b/webapp/src/components/viewHeader/filterEntry.tsx index 1c08337cb..b7195cf78 100644 --- a/webapp/src/components/viewHeader/filterEntry.tsx +++ b/webapp/src/components/viewHeader/filterEntry.tsx @@ -25,7 +25,7 @@ type Props = { filter: FilterClause } -const FilterEntry = React.memo((props: Props): JSX.Element => { +const FilterEntry = (props: Props): JSX.Element => { const {board, view, filter} = props const intl = useIntl() @@ -106,6 +106,6 @@ const FilterEntry = React.memo((props: Props): JSX.Element => { ) -}) +} -export default FilterEntry +export default React.memo(FilterEntry) diff --git a/webapp/src/components/viewHeader/newCardButton.tsx b/webapp/src/components/viewHeader/newCardButton.tsx index 8f4ddf802..4df6eeee7 100644 --- a/webapp/src/components/viewHeader/newCardButton.tsx +++ b/webapp/src/components/viewHeader/newCardButton.tsx @@ -22,7 +22,7 @@ type Props = { editCardTemplate: (cardTemplateId: string) => void } -const NewCardButton = React.memo((props: Props): JSX.Element => { +const NewCardButton = (props: Props): JSX.Element => { const cardTemplates: Card[] = useAppSelector(getCurrentBoardTemplates) const currentView = useAppSelector(getCurrentView) const intl = useIntl() @@ -79,6 +79,6 @@ const NewCardButton = React.memo((props: Props): JSX.Element => { ) -}) +} -export default NewCardButton +export default React.memo(NewCardButton) diff --git a/webapp/src/components/viewHeader/newCardButtonTemplateItem.tsx b/webapp/src/components/viewHeader/newCardButtonTemplateItem.tsx index 1bcbd527e..0d842492d 100644 --- a/webapp/src/components/viewHeader/newCardButtonTemplateItem.tsx +++ b/webapp/src/components/viewHeader/newCardButtonTemplateItem.tsx @@ -22,7 +22,7 @@ type Props = { editCardTemplate: (cardTemplateId: string) => void } -const NewCardButtonTemplateItem = React.memo((props: Props) => { +const NewCardButtonTemplateItem = (props: Props) => { const currentView = useAppSelector(getCurrentView) const {cardTemplate} = props const intl = useIntl() @@ -77,6 +77,6 @@ const NewCardButtonTemplateItem = React.memo((props: Props) => { } /> ) -}) +} -export default NewCardButtonTemplateItem +export default React.memo(NewCardButtonTemplateItem) diff --git a/webapp/src/components/viewHeader/viewHeader.tsx b/webapp/src/components/viewHeader/viewHeader.tsx index 6502de3d4..85ae3a1fb 100644 --- a/webapp/src/components/viewHeader/viewHeader.tsx +++ b/webapp/src/components/viewHeader/viewHeader.tsx @@ -41,7 +41,7 @@ type Props = { dateDisplayProperty?: IPropertyTemplate } -const ViewHeader = React.memo((props: Props) => { +const ViewHeader = (props: Props) => { const [showFilter, setShowFilter] = useState(false) const intl = useIntl() @@ -173,6 +173,6 @@ const ViewHeader = React.memo((props: Props) => { } ) -}) +} -export default ViewHeader +export default React.memo(ViewHeader) diff --git a/webapp/src/components/viewHeader/viewHeaderActionsMenu.tsx b/webapp/src/components/viewHeader/viewHeaderActionsMenu.tsx index 0584f1161..c1d86a057 100644 --- a/webapp/src/components/viewHeader/viewHeaderActionsMenu.tsx +++ b/webapp/src/components/viewHeader/viewHeaderActionsMenu.tsx @@ -92,7 +92,7 @@ function onExportCsvTrigger(board: Board, activeView: BoardView, cards: Card[], } } -const ViewHeaderActionsMenu = React.memo((props: Props) => { +const ViewHeaderActionsMenu = (props: Props) => { const {board, activeView, cards} = props const intl = useIntl() @@ -139,6 +139,6 @@ const ViewHeaderActionsMenu = React.memo((props: Props) => { ) -}) +} -export default ViewHeaderActionsMenu +export default React.memo(ViewHeaderActionsMenu) diff --git a/webapp/src/components/viewHeader/viewHeaderDisplayByMenu.tsx b/webapp/src/components/viewHeader/viewHeaderDisplayByMenu.tsx index 81eb42476..0ac922856 100644 --- a/webapp/src/components/viewHeader/viewHeaderDisplayByMenu.tsx +++ b/webapp/src/components/viewHeader/viewHeaderDisplayByMenu.tsx @@ -19,7 +19,7 @@ type Props = { dateDisplayPropertyName?: string } -const ViewHeaderDisplayByMenu = React.memo((props: Props) => { +const ViewHeaderDisplayByMenu = (props: Props) => { const {properties, activeView, dateDisplayPropertyName} = props const intl = useIntl() @@ -74,6 +74,6 @@ const ViewHeaderDisplayByMenu = React.memo((props: Props) => { ) -}) +} -export default ViewHeaderDisplayByMenu +export default React.memo(ViewHeaderDisplayByMenu) diff --git a/webapp/src/components/viewHeader/viewHeaderGroupByMenu.tsx b/webapp/src/components/viewHeader/viewHeaderGroupByMenu.tsx index a26ff746c..be15f712a 100644 --- a/webapp/src/components/viewHeader/viewHeaderGroupByMenu.tsx +++ b/webapp/src/components/viewHeader/viewHeaderGroupByMenu.tsx @@ -18,7 +18,7 @@ type Props = { groupByProperty?: IPropertyTemplate } -const ViewHeaderGroupByMenu = React.memo((props: Props) => { +const ViewHeaderGroupByMenu = (props: Props) => { const {properties, activeView, groupByProperty} = props const intl = useIntl() return ( @@ -74,6 +74,6 @@ const ViewHeaderGroupByMenu = React.memo((props: Props) => { ) -}) +} -export default ViewHeaderGroupByMenu +export default React.memo(ViewHeaderGroupByMenu) diff --git a/webapp/src/components/viewHeader/viewHeaderPropertiesMenu.tsx b/webapp/src/components/viewHeader/viewHeaderPropertiesMenu.tsx index 66262ee70..687676f86 100644 --- a/webapp/src/components/viewHeader/viewHeaderPropertiesMenu.tsx +++ b/webapp/src/components/viewHeader/viewHeaderPropertiesMenu.tsx @@ -15,7 +15,7 @@ type Props = { properties: readonly IPropertyTemplate[] activeView: BoardView } -const ViewHeaderPropertiesMenu = React.memo((props: Props) => { +const ViewHeaderPropertiesMenu = (props: Props) => { const {properties, activeView} = props const intl = useIntl() const {viewType, visiblePropertyIds} = activeView.fields @@ -68,6 +68,6 @@ const ViewHeaderPropertiesMenu = React.memo((props: Props) => { ) -}) +} -export default ViewHeaderPropertiesMenu +export default React.memo(ViewHeaderPropertiesMenu) diff --git a/webapp/src/components/viewHeader/viewHeaderSortMenu.tsx b/webapp/src/components/viewHeader/viewHeaderSortMenu.tsx index 976c44380..f07e2aeef 100644 --- a/webapp/src/components/viewHeader/viewHeaderSortMenu.tsx +++ b/webapp/src/components/viewHeader/viewHeaderSortMenu.tsx @@ -19,7 +19,7 @@ type Props = { activeView: BoardView orderedCards: Card[] } -const ViewHeaderSortMenu = React.memo((props: Props) => { +const ViewHeaderSortMenu = (props: Props) => { const {properties, activeView, orderedCards} = props const hasSort = activeView.fields.sortOptions?.length > 0 const sortDisplayOptions = properties?.map((o) => ({id: o.id, name: o.name})) @@ -101,6 +101,6 @@ const ViewHeaderSortMenu = React.memo((props: Props) => { ) -}) +} -export default ViewHeaderSortMenu +export default React.memo(ViewHeaderSortMenu) diff --git a/webapp/src/components/viewMenu.tsx b/webapp/src/components/viewMenu.tsx index 96024b333..a10eccadd 100644 --- a/webapp/src/components/viewMenu.tsx +++ b/webapp/src/components/viewMenu.tsx @@ -28,7 +28,7 @@ type Props = { readonly: boolean } -const ViewMenu = React.memo((props: Props) => { +const ViewMenu = (props: Props) => { const history = useHistory() const match = useRouteMatch() @@ -298,6 +298,6 @@ const ViewMenu = React.memo((props: Props) => { } ) -}) +} -export default injectIntl(ViewMenu) +export default injectIntl(React.memo(ViewMenu)) diff --git a/webapp/src/components/viewTitle.tsx b/webapp/src/components/viewTitle.tsx index e53d4abea..47abede10 100644 --- a/webapp/src/components/viewTitle.tsx +++ b/webapp/src/components/viewTitle.tsx @@ -21,7 +21,7 @@ type Props = { readonly: boolean } -const ViewTitle = React.memo((props: Props) => { +const ViewTitle = (props: Props) => { const {board} = props const [title, setTitle] = useState(board.title) @@ -102,6 +102,6 @@ const ViewTitle = React.memo((props: Props) => { } ) -}) +} -export default ViewTitle +export default React.memo(ViewTitle) diff --git a/webapp/src/components/workspace.tsx b/webapp/src/components/workspace.tsx index cc66f513b..397b177fa 100644 --- a/webapp/src/components/workspace.tsx +++ b/webapp/src/components/workspace.tsx @@ -109,7 +109,7 @@ function CenterContent(props: Props) { ) } -const Workspace = React.memo((props: Props) => { +const Workspace = (props: Props) => { const board = useAppSelector(getCurrentBoard) const view = useAppSelector(getCurrentView) const [boardTemplateSelectorOpen, setBoardTemplateSelectorOpen] = useState(false) @@ -149,6 +149,6 @@ const Workspace = React.memo((props: Props) => { ) -}) +} -export default Workspace +export default React.memo(Workspace) diff --git a/webapp/src/pages/changePasswordPage.tsx b/webapp/src/pages/changePasswordPage.tsx index c70acf02e..dc969729b 100644 --- a/webapp/src/pages/changePasswordPage.tsx +++ b/webapp/src/pages/changePasswordPage.tsx @@ -10,7 +10,7 @@ import {IUser} from '../user' import {useAppSelector} from '../store/hooks' import {getMe} from '../store/users' -const ChangePasswordPage = React.memo(() => { +const ChangePasswordPage = () => { const [oldPassword, setOldPassword] = useState('') const [newPassword, setNewPassword] = useState('') const [errorMessage, setErrorMessage] = useState('') @@ -94,6 +94,6 @@ const ChangePasswordPage = React.memo(() => { } ) -}) +} -export default ChangePasswordPage +export default React.memo(ChangePasswordPage) diff --git a/webapp/src/pages/dashboard/dashboardPage.tsx b/webapp/src/pages/dashboard/dashboardPage.tsx index 60a068dda..7fb817eb1 100644 --- a/webapp/src/pages/dashboard/dashboardPage.tsx +++ b/webapp/src/pages/dashboard/dashboardPage.tsx @@ -7,13 +7,13 @@ import Sidebar from '../../components/sidebar/sidebar' import DashboardCenterContent from './centerContent' -const DashboardPage = React.memo(() => ( +const DashboardPage = () => (
-)) +) -export default DashboardPage +export default React.memo(DashboardPage) diff --git a/webapp/src/pages/errorPage.tsx b/webapp/src/pages/errorPage.tsx index d90e87e13..91ab64c4a 100644 --- a/webapp/src/pages/errorPage.tsx +++ b/webapp/src/pages/errorPage.tsx @@ -8,7 +8,7 @@ import octoClient from '../octoClient' import Button from '../widgets/buttons/button' import './errorPage.scss' -const ErrorPage = React.memo(() => { +const ErrorPage = () => { const history = useHistory() return ( @@ -35,6 +35,6 @@ const ErrorPage = React.memo(() => { ) -}) +} -export default ErrorPage +export default React.memo(ErrorPage) diff --git a/webapp/src/pages/loginPage.tsx b/webapp/src/pages/loginPage.tsx index 547f27abf..7f5513d8d 100644 --- a/webapp/src/pages/loginPage.tsx +++ b/webapp/src/pages/loginPage.tsx @@ -11,7 +11,7 @@ import Button from '../widgets/buttons/button' import client from '../octoClient' import './loginPage.scss' -const LoginPage = React.memo(() => { +const LoginPage = () => { const [username, setUsername] = useState('') const [password, setPassword] = useState('') const [errorMessage, setErrorMessage] = useState('') @@ -88,6 +88,6 @@ const LoginPage = React.memo(() => { } ) -}) +} -export default LoginPage +export default React.memo(LoginPage) diff --git a/webapp/src/pages/registerPage.tsx b/webapp/src/pages/registerPage.tsx index 48b437033..e765893c4 100644 --- a/webapp/src/pages/registerPage.tsx +++ b/webapp/src/pages/registerPage.tsx @@ -11,7 +11,7 @@ import Button from '../widgets/buttons/button' import client from '../octoClient' import './registerPage.scss' -const RegisterPage = React.memo(() => { +const RegisterPage = () => { const [username, setUsername] = useState('') const [password, setPassword] = useState('') const [email, setEmail] = useState('') @@ -96,6 +96,6 @@ const RegisterPage = React.memo(() => { } ) -}) +} -export default RegisterPage +export default React.memo(RegisterPage) diff --git a/webapp/src/pages/welcome/welcomePage.tsx b/webapp/src/pages/welcome/welcomePage.tsx index 366abf70f..29f34bdd1 100644 --- a/webapp/src/pages/welcome/welcomePage.tsx +++ b/webapp/src/pages/welcome/welcomePage.tsx @@ -15,7 +15,7 @@ import {Utils} from '../../utils' import './welcomePage.scss' -const WelcomePage = React.memo(() => { +const WelcomePage = () => { const history = useHistory() const queryString = new URLSearchParams(useLocation().search) @@ -84,6 +84,6 @@ const WelcomePage = React.memo(() => { ) -}) +} -export default WelcomePage +export default React.memo(WelcomePage) diff --git a/webapp/src/widgets/menuWrapper.tsx b/webapp/src/widgets/menuWrapper.tsx index 4e19c601a..2b2e2f6ee 100644 --- a/webapp/src/widgets/menuWrapper.tsx +++ b/webapp/src/widgets/menuWrapper.tsx @@ -14,7 +14,7 @@ type Props = { label?: string } -const MenuWrapper = React.memo((props: Props) => { +const MenuWrapper = (props: Props) => { const node = useRef(null) const [open, setOpen] = useState(Boolean(props.isOpen)) @@ -94,6 +94,6 @@ const MenuWrapper = React.memo((props: Props) => { {children && !props.disabled && open ? Object.values(children)[1] : null} ) -}) +} -export default MenuWrapper +export default React.memo(MenuWrapper) diff --git a/webapp/src/widgets/propertyMenu.tsx b/webapp/src/widgets/propertyMenu.tsx index a8387d349..126563b3c 100644 --- a/webapp/src/widgets/propertyMenu.tsx +++ b/webapp/src/widgets/propertyMenu.tsx @@ -89,7 +89,7 @@ export const PropertyTypes = (props: TypesProps): JSX.Element => { ) } -const PropertyMenu = React.memo((props: Props) => { +const PropertyMenu = (props: Props) => { const intl = useIntl() const nameTextbox = useRef(null) const [name, setName] = useState(props.propertyName) @@ -144,6 +144,6 @@ const PropertyMenu = React.memo((props: Props) => { /> ) -}) +} -export default PropertyMenu +export default React.memo(PropertyMenu) diff --git a/webapp/src/widgets/valueSelector.tsx b/webapp/src/widgets/valueSelector.tsx index e1493524f..1ada4ab21 100644 --- a/webapp/src/widgets/valueSelector.tsx +++ b/webapp/src/widgets/valueSelector.tsx @@ -44,7 +44,7 @@ type LabelProps = { isMulti?: boolean } -const ValueSelectorLabel = React.memo((props: LabelProps): JSX.Element => { +const ValueSelectorLabel = (props: LabelProps): JSX.Element => { const {option, onDeleteValue, meta, isMulti} = props const intl = useIntl() if (meta.context === 'value') { @@ -99,7 +99,7 @@ const ValueSelectorLabel = React.memo((props: LabelProps): JSX.Element => { ) -}) +} const valueSelectorStyle = { ...getSelectBaseStyle(), @@ -200,4 +200,4 @@ function ValueSelector(props: Props): JSX.Element { ) } -export default ValueSelector +export default React.memo(ValueSelector)