diff --git a/src/app/collective-rewards/active-builders/ActiveBuildersContent.tsx b/src/app/collective-rewards/active-builders/ActiveBuildersContent.tsx index 0f3049ca..730aa2a6 100644 --- a/src/app/collective-rewards/active-builders/ActiveBuildersContent.tsx +++ b/src/app/collective-rewards/active-builders/ActiveBuildersContent.tsx @@ -1,6 +1,6 @@ import { SearchContextProvider } from '@/app/collective-rewards/shared' import { withSpinner } from '@/components/LoadingSpinner/withLoadingSpinner' -import { useHandleErrors } from '@/app/collective-rewards/utils' +import { isBuilderDeactivated, useHandleErrors } from '@/app/collective-rewards/utils' import { useGetBuildersByState } from '@/app/collective-rewards/user/' import { ActiveBuildersGrid } from '@/app/collective-rewards/active-builders' import { Search } from '@/app/collective-rewards/shared' @@ -31,6 +31,7 @@ export const ActiveBuildersContent = () => { true, ) useHandleErrors({ error, title: 'Error loading builders' }) + const filteredBuilders = builders.filter(isBuilderDeactivated) const status = [ { label: 'All', value: 'all' }, @@ -40,7 +41,7 @@ export const ActiveBuildersContent = () => { return ( <> - + {withSpinner(ActiveBuildersGrid)({ isLoading })} diff --git a/src/app/collective-rewards/shared/components/Table/TableCells.tsx b/src/app/collective-rewards/shared/components/Table/TableCells.tsx index 9f1c90e6..775cecdc 100644 --- a/src/app/collective-rewards/shared/components/Table/TableCells.tsx +++ b/src/app/collective-rewards/shared/components/Table/TableCells.tsx @@ -102,7 +102,7 @@ export const BuilderNameCell: FC = ({
- +
{ return !!(stateFlags && stateFlags.communityApproved && stateFlags.kycApproved && !stateFlags.paused) } +export const isBuilderDeactivated = ({ gauge, stateFlags }: Builder) => + !!(gauge && stateFlags && !stateFlags.communityApproved) + export const isBuilderActive = (stateFlags?: BuilderStateFlags) => { return !!( stateFlags &&