Refactor audio section in sidebar
This commit is contained in:
+5
-3
@@ -2,7 +2,8 @@ import { useState } from "react";
|
||||
import { Layout } from "@/components/Layout";
|
||||
import { ChatView } from "@/components/chat/ChatView";
|
||||
import { ImageView } from "@/components/images/ImageView";
|
||||
import { AudioView } from "@/components/audio/AudioView";
|
||||
import { TranscriptionView } from "@/components/audio/TranscriptionView";
|
||||
import { GenerationView } from "@/components/audio/GenerationView";
|
||||
import { BotView } from "@/components/bots/BotView";
|
||||
import { BotChat } from "@/components/bots/BotChat";
|
||||
import { AgentView } from "@/components/agent/AgentView";
|
||||
@@ -15,7 +16,7 @@ interface Bot {
|
||||
}
|
||||
|
||||
const Index = () => {
|
||||
const [activeView, setActiveView] = useState<"chat" | "images" | "audio" | "bots" | "agent">("chat");
|
||||
const [activeView, setActiveView] = useState<"chat" | "images" | "transcription" | "generation" | "bots" | "agent">("chat");
|
||||
const [activeBotChat, setActiveBotChat] = useState<Bot | null>(null);
|
||||
|
||||
const handleStartBotChat = (bot: Bot) => {
|
||||
@@ -30,7 +31,8 @@ const Index = () => {
|
||||
<Layout activeTab={activeView} onTabChange={setActiveView}>
|
||||
{activeView === "chat" && <ChatView />}
|
||||
{activeView === "images" && <ImageView />}
|
||||
{activeView === "audio" && <AudioView />}
|
||||
{activeView === "transcription" && <TranscriptionView />}
|
||||
{activeView === "generation" && <GenerationView />}
|
||||
{activeView === "bots" && (
|
||||
activeBotChat ? (
|
||||
<BotChat bot={activeBotChat} onBack={handleBackFromBotChat} />
|
||||
|
||||
Reference in New Issue
Block a user