Skip to content

Commit

Permalink
fix(rewards): hide filter after disconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
solidovic committed Aug 5, 2024
1 parent 2e80a5a commit e5f61d6
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
import { FC } from 'react';
import { useRewardsHistory } from 'features/rewards/hooks';
import { useDappStatus } from 'shared/hooks/use-dapp-status';

import { LeftOptions } from './LeftOptions';
import { RightOptions } from './RightOptions';
import { RewardsListHeaderStyle } from './styles';
import { TitleStyle } from './styles';

export const RewardsListHeader: FC = () => {
const { isDappActive } = useDappStatus();
const { error, data } = useRewardsHistory();
return (
<RewardsListHeaderStyle data-testid="rewardsHeader">
<TitleStyle>Reward history</TitleStyle>
{!error && data && data?.events.length > 0 && (
{isDappActive && !error && data && data?.events.length > 0 && (
<>
<LeftOptions />
<RightOptions />
Expand Down

0 comments on commit e5f61d6

Please sign in to comment.