+ {/* {text?.length && (
+
+ {text}
+
+ )} */}
+ {image_url && (
+
+ )}
+
+ );
+};
diff --git a/sample-apps/react/egress-composite/src/components/UIDispatcher.tsx b/sample-apps/react/egress-composite/src/components/UIDispatcher.tsx
new file mode 100644
index 0000000000..34677500c5
--- /dev/null
+++ b/sample-apps/react/egress-composite/src/components/UIDispatcher.tsx
@@ -0,0 +1,23 @@
+import { useCallStateHooks } from '@stream-io/video-react-sdk';
+
+import { useConfigurationContext } from '../ConfigurationContext';
+import { LayoutType, layoutMap } from './layouts';
+import { Spotlight } from './layouts/Spotlight';
+
+const DEFAULT_LAYOUT: LayoutType = 'spotlight';
+const DEFAULT_SCREENSHARE_LAYOUT: LayoutType = 'spotlight';
+
+export const UIDispatcher = () => {
+ const {
+ layout = DEFAULT_LAYOUT,
+ screenshare_layout = DEFAULT_SCREENSHARE_LAYOUT,
+ } = useConfigurationContext();
+ const { useHasOngoingScreenShare } = useCallStateHooks();
+ const hasScreenShare = useHasOngoingScreenShare();
+
+ const DefaultView = layoutMap[layout]?.[0] ?? Spotlight;
+
+ const ScreenShareView = layoutMap[screenshare_layout]?.[1] ?? Spotlight;
+
+ return hasScreenShare ?