Skip to content

Commit

Permalink
fix: Use sg indicator the places where it is used (#9886)
Browse files Browse the repository at this point in the history
<!--
Before opening a pull request, please read the [contributing
guidelines](https://github.com/pancakeswap/pancake-frontend/blob/develop/CONTRIBUTING.md)
first
-->

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to add `V3SubgraphHealthIndicator` and
`PredictionSubgraphHealthIndicator` components to various views for
monitoring subgraph health.

### Detailed summary
- Added `V3SubgraphHealthIndicator` to `PositionManagers` view
- Removed `V3SubgraphHealthIndicator` from `liquidity` index
- Added `PredictionSubgraphHealthIndicator` to `Leaderboard` view

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`

<!-- end pr-codex -->
  • Loading branch information
memoyil authored May 31, 2024
1 parent e5d1110 commit 08be304
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 5 deletions.
2 changes: 0 additions & 2 deletions apps/web/src/pages/liquidity/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import { Liquidity } from '@pancakeswap/widgets-internal'
import { AppBody, AppHeader } from 'components/App'
import TransactionsModal from 'components/App/Transactions/TransactionsModal'
import { RangeTag } from 'components/RangeTag'
import { V3SubgraphHealthIndicator } from 'components/SubgraphHealthIndicator'
import { V3_MIGRATION_SUPPORTED_CHAINS } from 'config/constants/supportChains'
import useAccountActiveChain from 'hooks/useAccountActiveChain'
import useV2PairsByAccount from 'hooks/useV2Pairs'
Expand Down Expand Up @@ -362,7 +361,6 @@ export default function PoolListPage() {
</Button>
</NextLink>
</CardFooter>
<V3SubgraphHealthIndicator />
</AppBody>
</Page>
)
Expand Down
1 change: 0 additions & 1 deletion apps/web/src/views/Pools/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ const Pools: React.FC<React.PropsWithChildren> = () => {
</>
)}
</PoolControls>
<V3SubgraphHealthIndicator />
</Page>
</>
)
Expand Down
2 changes: 2 additions & 0 deletions apps/web/src/views/PositionManagers/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Page from 'components/Layout/Page'

import { V3SubgraphHealthIndicator } from 'components/SubgraphHealthIndicator'
import { Header } from './components'
import { Controls, VaultContent } from './containers'

Expand All @@ -10,6 +11,7 @@ export function PositionManagers() {
<Page>
<Controls />
<VaultContent />
<V3SubgraphHealthIndicator />
</Page>
</>
)
Expand Down
2 changes: 2 additions & 0 deletions apps/web/src/views/Predictions/Leaderboard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { filterLeaderboard } from 'state/predictions'
import { useGetLeaderboardFilters, useGetLeaderboardLoadingState } from 'state/predictions/hooks'
import { usePredictionConfigs } from 'views/Predictions/hooks/usePredictionConfigs'
import { useAccount } from 'wagmi'
import { PredictionSubgraphHealthIndicator } from 'components/SubgraphHealthIndicator'
import Filters from './components/Filters'
import Hero from './components/Hero'
import Results from './components/Results'
Expand Down Expand Up @@ -74,6 +75,7 @@ const Leaderboard = () => {
token={predictionConfigs?.[pickedTokenSymbol]?.token}
api={predictionConfigs?.[pickedTokenSymbol]?.api ?? ''}
/>
<PredictionSubgraphHealthIndicator />
</>
)
}
Expand Down
2 changes: 0 additions & 2 deletions apps/web/src/views/Predictions/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { PredictionsChartView } from '@pancakeswap/prediction'
import { useMatchBreakpoints, useModal } from '@pancakeswap/uikit'
import { PredictionSubgraphHealthIndicator } from 'components/SubgraphHealthIndicator'
import { useAccountLocalEventListener } from 'hooks/useAccountLocalEventListener'
import { useEffect, useRef } from 'react'
import { useChartView, useIsChartPaneOpen } from 'state/predictions/hooks'
Expand Down Expand Up @@ -63,7 +62,6 @@ const Predictions = () => {
<CollectWinningsPopup />
</Container>
</SwiperProvider>
<PredictionSubgraphHealthIndicator />
</>
)
}
Expand Down

0 comments on commit 08be304

Please sign in to comment.