Skip to content

Commit b78f3a8

Browse files
authored
fix: prevent rendering of governance banner if KYC is not approved (#3133)
1 parent 92edc87 commit b78f3a8

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

packages/apps/human-app/frontend/src/modules/governance-banner/components/governance-banner.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@ import { useTranslation } from 'react-i18next';
55
import { env } from '@/shared/env';
66
import { useColorMode } from '@/shared/contexts/color-mode';
77
import { useIsMobile } from '@/shared/hooks/use-is-mobile';
8+
import { useWorkerKycStatus } from '@/modules/worker/profile/hooks';
89
import { useActiveProposalQuery } from '../hooks/use-active-proposal-query';
910

1011
export function GovernanceBanner() {
1112
const { t } = useTranslation();
1213
const { data, isLoading, isError } = useActiveProposalQuery();
14+
const { kycApproved } = useWorkerKycStatus();
1315
const { colorPalette } = useColorMode();
1416
const [timeRemaining, setTimeRemaining] = useState('00:00:00');
1517
const isMobile = useIsMobile('lg');
@@ -41,7 +43,7 @@ export function GovernanceBanner() {
4143
};
4244
}, [data?.deadline]);
4345

44-
if (isLoading || isError || !data) {
46+
if (!kycApproved || isLoading || isError || !data) {
4547
return null;
4648
}
4749

0 commit comments

Comments
 (0)