From 4b60ecd56ccdc68d028bf7864d8fc01cc5d5f2cf Mon Sep 17 00:00:00 2001 From: lev tarasov <56757711+levil664@users.noreply.github.com> Date: Mon, 1 Jul 2024 11:55:59 +0500 Subject: [PATCH] del memo --- .../common/components/bubbleFilter/index.tsx | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/apps/schools/domains/common/components/bubbleFilter/index.tsx b/apps/schools/domains/common/components/bubbleFilter/index.tsx index 4a4cd70c..3a3b89af 100644 --- a/apps/schools/domains/common/components/bubbleFilter/index.tsx +++ b/apps/schools/domains/common/components/bubbleFilter/index.tsx @@ -4,20 +4,7 @@ import styles from './styles/styles.module.scss' import { BubbleFilterProps, BubbleFilterListItem } from '@domains/common/components/bubbleFilter/interface' import { CloseOutlined } from '@ant-design/icons' -export const BubbleFilter: React.FC = React.memo(({ text, items }) => { - const [selectedStatuses, setSelectedStatuses] = useState([]) - - useEffect(() => { - const storedStatuses = localStorage.getItem('selectedStatuses') - if (storedStatuses) { - setSelectedStatuses(JSON.parse(storedStatuses)) - } - }, []) - - useEffect(() => { - localStorage.setItem('selectedStatuses', JSON.stringify(selectedStatuses)) - }, [selectedStatuses]) - +export const BubbleFilter: React.FC = ({ text, items }) => { const listItems = items.map((item: BubbleFilterListItem) => item.count && item.count > 0 ? ( = React.memo(({ text, ite {listItems} ) -}) +}