From 115c4fc60c7c3e5fa6874d4f0c14cb998c8a85b3 Mon Sep 17 00:00:00 2001 From: Tanish Manku <-h> Date: Wed, 19 Mar 2025 23:58:53 -0700 Subject: [PATCH] Add a generation mode UI component --- .../GenerationRootComponent.tsx | 24 +++++++++++++++++ .../realtime/src/app/pages/main/index.tsx | 27 +++++++++++++++++-- .../features/ToolbarTopLeft/index.tsx | 3 ++- .../realtime/src/signals/uiEvents/appMode.ts | 2 +- 4 files changed, 52 insertions(+), 4 deletions(-) create mode 100644 frontend/realtime/src/GenerationRootComponent/GenerationRootComponent.tsx diff --git a/frontend/realtime/src/GenerationRootComponent/GenerationRootComponent.tsx b/frontend/realtime/src/GenerationRootComponent/GenerationRootComponent.tsx new file mode 100644 index 0000000000..65107cfcde --- /dev/null +++ b/frontend/realtime/src/GenerationRootComponent/GenerationRootComponent.tsx @@ -0,0 +1,24 @@ +import { faSparkles } from "@fortawesome/pro-solid-svg-icons"; +import { Button } from "~/components/ui"; +import { useRenderCounter } from "~/hooks/useRenderCounter"; + +export const GenerationRootComponent = () => { + // This is a hook that will log the number of times the component has rerendered + // Let's make sure we only log once + useRenderCounter("GenerationRootComponent"); + + return ( + <> +