From 9a98550be519d1ca5a77a750941753a3eeff1ffa Mon Sep 17 00:00:00 2001 From: "tai.truong" Date: Tue, 26 Mar 2024 15:09:09 +0700 Subject: [PATCH] fix: MET-1960 show pool retired --- src/components/DelegationPool/DelegationList/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/DelegationPool/DelegationList/index.tsx b/src/components/DelegationPool/DelegationList/index.tsx index 104412efc6..22d69cc843 100644 --- a/src/components/DelegationPool/DelegationList/index.tsx +++ b/src/components/DelegationPool/DelegationList/index.tsx @@ -34,10 +34,11 @@ const DelegationLists: React.FC = () => { const [value, setValue] = useState(""); const [search, setSearch] = useState(decodeURIComponent(tickerNameSearch)); const { pageInfo, setSort } = usePageInfo(); - const [isShowRetired, setIsRetired] = useState(!!pageInfo.retired); + const [isShowRetired, setIsRetired] = useState(/^true$/i.test(pageInfo.retired)); const tableRef = useRef(null); const blockKey = useSelector(({ system }: RootState) => system.blockKey); + useEffect(() => { if (tickerNameSearch !== search) history.replace({ search: stringify({ ...pageInfo, page: 1 }) }); if (tickerNameSearch) {