mirror of
https://github.com/Unleash/unleash.git
synced 2025-07-26 13:48:33 +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:
parent
005daa3740
commit
3dc7f22aaa
@ -1,4 +1,4 @@
|
|||||||
import { useState } from 'react';
|
import { useState, useEffect} from 'react';
|
||||||
import {
|
import {
|
||||||
Table,
|
Table,
|
||||||
TableBody,
|
TableBody,
|
||||||
@ -80,6 +80,11 @@ const FeatureToggleListNew = ({
|
|||||||
|
|
||||||
const { page, pages, nextPage, prevPage, setPageIndex, pageIndex } =
|
const { page, pages, nextPage, prevPage, setPageIndex, pageIndex } =
|
||||||
usePagination(sortedFeatures, 50);
|
usePagination(sortedFeatures, 50);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
setSortedFeatures(sortList([...features], sortOpt))
|
||||||
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
|
}, [features])
|
||||||
|
|
||||||
const updateSort = (field: string) => {
|
const updateSort = (field: string) => {
|
||||||
let newSortOpt;
|
let newSortOpt;
|
||||||
|
@ -50,7 +50,7 @@ const ProjectInfo = ({
|
|||||||
commonStyles.justifyCenter,
|
commonStyles.justifyCenter,
|
||||||
styles.infoLink
|
styles.infoLink
|
||||||
)}
|
)}
|
||||||
to={`/reporting?project=${id}`}
|
to={`/projects/${id}/health`}
|
||||||
>
|
>
|
||||||
<span className={styles.linkText} data-loading>
|
<span className={styles.linkText} data-loading>
|
||||||
view more{' '}
|
view more{' '}
|
||||||
|
Loading…
Reference in New Issue
Block a user