1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-04-15 01:16:22 +02:00

fix switch toggle for envs after update + update link for health overview (#446)

* fix switch toggle for envs after update

* fix: React hook missing dependency error
This commit is contained in:
Youssef Khedher 2021-10-19 14:38:20 +01:00 committed by GitHub
parent 005daa3740
commit 3dc7f22aaa
2 changed files with 7 additions and 2 deletions

View File

@ -1,4 +1,4 @@
import { useState } from 'react';
import { useState, useEffect} from 'react';
import {
Table,
TableBody,
@ -80,6 +80,11 @@ const FeatureToggleListNew = ({
const { page, pages, nextPage, prevPage, setPageIndex, pageIndex } =
usePagination(sortedFeatures, 50);
useEffect(() => {
setSortedFeatures(sortList([...features], sortOpt))
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [features])
const updateSort = (field: string) => {
let newSortOpt;

View File

@ -50,7 +50,7 @@ const ProjectInfo = ({
commonStyles.justifyCenter,
styles.infoLink
)}
to={`/reporting?project=${id}`}
to={`/projects/${id}/health`}
>
<span className={styles.linkText} data-loading>
view more{' '}