diff --git a/frontend/src/assets/img/ossSegments.png b/frontend/src/assets/img/ossSegments.png new file mode 100644 index 0000000000..02593ef0fe Binary files /dev/null and b/frontend/src/assets/img/ossSegments.png differ diff --git a/frontend/src/assets/img/ossSegmentsConfetti.svg b/frontend/src/assets/img/ossSegmentsConfetti.svg new file mode 100644 index 0000000000..9bdf15af75 --- /dev/null +++ b/frontend/src/assets/img/ossSegmentsConfetti.svg @@ -0,0 +1 @@ + diff --git a/frontend/src/component/layout/MainLayout/MainLayout.tsx b/frontend/src/component/layout/MainLayout/MainLayout.tsx index b5a30304be..55b0f38ae0 100644 --- a/frontend/src/component/layout/MainLayout/MainLayout.tsx +++ b/frontend/src/component/layout/MainLayout/MainLayout.tsx @@ -1,4 +1,4 @@ -import React, { forwardRef, ReactNode } from 'react'; +import { forwardRef, ReactNode } from 'react'; import { Grid, styled } from '@mui/material'; import Header from 'component/menu/Header/Header'; import Footer from 'component/menu/Footer/Footer'; @@ -15,6 +15,7 @@ import { useChangeRequestsEnabled } from 'hooks/useChangeRequestsEnabled'; import { DraftBanner } from './DraftBanner/DraftBanner'; import { ThemeMode } from 'component/common/ThemeMode/ThemeMode'; import { Demo } from 'component/demo/Demo'; +import { SegmentsSplashScreen } from 'component/splash/SegmentsSplashScreen/SegmentsSplashScreen'; interface IMainLayoutProps { children: ReactNode; @@ -76,12 +77,17 @@ const MainLayoutContentContainer = styled('div')(({ theme }) => ({ export const MainLayout = forwardRef( ({ children }, ref) => { - const { uiConfig } = useUiConfig(); + const { uiConfig, isOss, loading } = useUiConfig(); const projectId = useOptionalPathParam('projectId'); const { isChangeRequestConfiguredInAnyEnv } = useChangeRequestsEnabled( projectId || '', ); + // only show segment splash if we're really certain it's OSS. + // Otherwise it might lead to flashing the splash to + // pro/enterprise users before data has loaded. + const showSegmentSplash = !loading && isOss(); + return ( <> @@ -127,6 +133,10 @@ export const MainLayout = forwardRef(