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:
parent
005daa3740
commit
3dc7f22aaa
@ -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;
|
||||
|
@ -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{' '}
|
||||
|
Loading…
Reference in New Issue
Block a user