diff --git a/apps/opik-frontend/public/images/logo_and_text.png b/apps/opik-frontend/public/images/comet-logo.png similarity index 100% rename from apps/opik-frontend/public/images/logo_and_text.png rename to apps/opik-frontend/public/images/comet-logo.png diff --git a/apps/opik-frontend/public/images/opik-logo.png b/apps/opik-frontend/public/images/opik-logo.png new file mode 100644 index 0000000000..f4643b3a4f Binary files /dev/null and b/apps/opik-frontend/public/images/opik-logo.png differ diff --git a/apps/opik-frontend/src/components/layout/EmptyLayout/EmptyLayout.tsx b/apps/opik-frontend/src/components/layout/EmptyLayout/EmptyLayout.tsx index 465d409817..fd7e41388b 100644 --- a/apps/opik-frontend/src/components/layout/EmptyLayout/EmptyLayout.tsx +++ b/apps/opik-frontend/src/components/layout/EmptyLayout/EmptyLayout.tsx @@ -1,23 +1,27 @@ +import React from "react"; import useAppStore from "@/store/AppStore"; import usePluginsStore from "@/store/PluginsStore"; import { Link, Outlet } from "@tanstack/react-router"; -import imageLogoUrl from "/images/logo_and_text.png"; +import Logo from "@/components/layout/Logo/Logo"; -const PageLayout = () => { +const EmptyLayout = () => { const UserMenu = usePluginsStore((state) => state.UserMenu); + const LogoComponent = usePluginsStore((state) => state.Logo); const workspaceName = useAppStore((state) => state.activeWorkspaceName); + const logo = LogoComponent ? ( + + ) : ( + + ); + return (
diff --git a/apps/opik-frontend/src/store/PluginsStore.ts b/apps/opik-frontend/src/store/PluginsStore.ts index 73de67fb61..d235020377 100644 --- a/apps/opik-frontend/src/store/PluginsStore.ts +++ b/apps/opik-frontend/src/store/PluginsStore.ts @@ -4,8 +4,9 @@ import { create } from "zustand"; import WorkspacePreloader from "@/components/shared/WorkspacePreloader/WorkspacePreloader"; type PluginStore = { - GetStartedPage: React.ComponentType | null; + Logo: React.ComponentType<{ expanded: boolean }> | null; UserMenu: React.ComponentType | null; + GetStartedPage: React.ComponentType | null; WorkspacePreloader: React.ComponentType<{ children: React.ReactNode }> | null; init: unknown; setupPlugins: (folderName: string) => Promise; @@ -13,15 +14,17 @@ type PluginStore = { const VALID_PLUGIN_FOLDER_NAMES = ["comet"]; const PLUGIN_NAMES = [ - "GetStartedPage", + "Logo", "UserMenu", + "GetStartedPage", "WorkspacePreloader", "init", ]; const usePluginsStore = create((set) => ({ - GetStartedPage: null, + Logo: null, UserMenu: null, + GetStartedPage: null, WorkspacePreloader: null, init: null, setupPlugins: async (folderName: string) => {