mirror of
https://github.com/Unleash/unleash.git
synced 2024-10-28 19:06:12 +01:00
fix: move outdated sdks check up (#6725)
This commit is contained in:
parent
ca6946df86
commit
c12cb42885
@ -23,6 +23,7 @@ import { EdgeUpgradeBanner } from './banners/EdgeUpgradeBanner/EdgeUpgradeBanner
|
||||
import { LicenseBanner } from './banners/internalBanners/LicenseBanner';
|
||||
import { Demo } from './demo/Demo';
|
||||
import { OutdatedSdksBanner } from './banners/OutdatedSdksBanner/OutdatedSdksBanner';
|
||||
import { useUiFlag } from '../hooks/useUiFlag';
|
||||
|
||||
const StyledContainer = styled('div')(() => ({
|
||||
'& ul': {
|
||||
@ -49,6 +50,8 @@ export const App = () => {
|
||||
}
|
||||
}, [authDetails, user]);
|
||||
|
||||
const outdatedSdksBannerEnabled = useUiFlag('outdatedSdksBanner');
|
||||
|
||||
return (
|
||||
<SWRProvider>
|
||||
<Suspense fallback={<Loader />}>
|
||||
@ -68,6 +71,10 @@ export const App = () => {
|
||||
<ExternalBanners />
|
||||
<InternalBanners />
|
||||
<EdgeUpgradeBanner />
|
||||
<ConditionallyRender
|
||||
condition={outdatedSdksBannerEnabled}
|
||||
show={<OutdatedSdksBanner />}
|
||||
/>
|
||||
<OutdatedSdksBanner />
|
||||
<StyledContainer>
|
||||
<ToastRenderer />
|
||||
|
@ -2,7 +2,6 @@ import { ConditionallyRender } from 'component/common/ConditionallyRender/Condit
|
||||
import { Banner } from '../Banner/Banner';
|
||||
import type { IBanner } from 'interfaces/banner';
|
||||
import { useOutdatedSdks } from 'hooks/api/getters/useOutdatedSdks/useOutdatedSdks';
|
||||
import { useUiFlag } from 'hooks/useUiFlag';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { styled } from '@mui/material';
|
||||
import { usePlausibleTracker } from 'hooks/usePlausibleTracker';
|
||||
@ -13,7 +12,6 @@ export const OutdatedSdksBanner = () => {
|
||||
const {
|
||||
data: { sdks },
|
||||
} = useOutdatedSdks();
|
||||
const flagEnabled = useUiFlag('outdatedSdksBanner');
|
||||
const { trackEvent } = usePlausibleTracker();
|
||||
|
||||
const applicationClickedWithVersion = (sdkVersion: string) => {
|
||||
@ -74,7 +72,7 @@ export const OutdatedSdksBanner = () => {
|
||||
return (
|
||||
<>
|
||||
<ConditionallyRender
|
||||
condition={flagEnabled && sdks.length > 0}
|
||||
condition={sdks.length > 0}
|
||||
show={<Banner banner={outdatedSdksBanner} />}
|
||||
/>
|
||||
</>
|
||||
|
Loading…
Reference in New Issue
Block a user