diff --git a/frontends/chat/src/pages/chat.tsx b/frontends/chat/src/pages/chat.tsx index 21315831db..f03a094232 100644 --- a/frontends/chat/src/pages/chat.tsx +++ b/frontends/chat/src/pages/chat.tsx @@ -4,6 +4,7 @@ import { Navbar } from "../components/Navbar/Navbar"; import { Sidebar } from "../components/Navbar/Sidebar"; import { UserContext } from "../components/contexts/UserContext"; import { Topic } from "../utils/apiTypes"; +import { NoDatasetsErrorPage } from "./no-datasets-warning"; export const Chat = () => { const userContext = useContext(UserContext); @@ -106,15 +107,27 @@ export const Chat = () => { setSelectedTopic={setSelectedTopic} topics={topics} /> - + + } + when={ + userContext?.datasetsAndUsages?.length && + userContext?.datasetsAndUsages?.length <= 0 + } + > + + ); diff --git a/frontends/chat/src/pages/no-datasets-warning.tsx b/frontends/chat/src/pages/no-datasets-warning.tsx new file mode 100644 index 0000000000..1ec6bd43d2 --- /dev/null +++ b/frontends/chat/src/pages/no-datasets-warning.tsx @@ -0,0 +1,23 @@ +import { FiExternalLink } from "solid-icons/fi"; + +interface NoDatasetsErrorPageProps { + orgId: string | undefined; +} +export const NoDatasetsErrorPage = (props: NoDatasetsErrorPageProps) => { + const dashboardLink = import.meta.env.VITE_DASHBOARD_URL as string; + return ( +
+
+
You have no datasets in this organization to chat with.
+ + Create New Dataset + + +
+
+ ); +};