From 25478f467cb0895ffa484d6a853ff3a5f93b640f Mon Sep 17 00:00:00 2001 From: Ezerous Date: Sat, 27 Feb 2021 22:17:11 +0200 Subject: [PATCH 1/2] fix: useless rerenders --- .../concordia-app/src/components/Status/StatusValueRow.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/concordia-app/src/components/Status/StatusValueRow.jsx b/packages/concordia-app/src/components/Status/StatusValueRow.jsx index be09d0a..dda44f3 100644 --- a/packages/concordia-app/src/components/Status/StatusValueRow.jsx +++ b/packages/concordia-app/src/components/Status/StatusValueRow.jsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { memo } from 'react'; import { Table } from 'semantic-ui-react'; import { CopyToClipboard } from 'react-copy-to-clipboard'; @@ -19,4 +19,4 @@ const StatusValueRow = (props) => { ); }; -export default StatusValueRow; +export default memo(StatusValueRow); From 48288aea1847b6a5f2f50ce3fffd576039f85a59 Mon Sep 17 00:00:00 2001 From: Ezerous Date: Sat, 27 Feb 2021 22:24:17 +0200 Subject: [PATCH 2/2] fix: useless rerenders vol.2 --- .../src/layouts/MainLayout/MainLayoutMenu/index.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/concordia-app/src/layouts/MainLayout/MainLayoutMenu/index.jsx b/packages/concordia-app/src/layouts/MainLayout/MainLayoutMenu/index.jsx index 1f0c0f7..a12d633 100644 --- a/packages/concordia-app/src/layouts/MainLayout/MainLayoutMenu/index.jsx +++ b/packages/concordia-app/src/layouts/MainLayout/MainLayoutMenu/index.jsx @@ -1,4 +1,4 @@ -import React, { useState } from 'react'; +import React, { memo, useState } from 'react'; import { Dropdown, Menu } from 'semantic-ui-react'; import { useTranslation } from 'react-i18next'; import { useHistory } from 'react-router'; @@ -95,4 +95,4 @@ const MainLayoutMenu = () => { ); }; -export default MainLayoutMenu; +export default memo(MainLayoutMenu);