Conditionally render testing feature based on use testing flag

This commit is contained in:
akhisud3195 2025-04-07 17:19:58 +05:30
parent 01e7962868
commit 7f6ece90f8

View file

@ -16,6 +16,7 @@ import {
} from "lucide-react";
import { getProjectConfig } from "@/app/actions/project_actions";
import { useTheme } from "@/app/providers/theme-provider";
import { USE_TESTING_FEATURE } from '@/app/lib/feature_flags';
interface SidebarProps {
projectId: string;
@ -56,12 +57,12 @@ export default function Sidebar({ projectId, useRag, useAuth, collapsed = false,
icon: WorkflowIcon,
requiresProject: true
},
{
...(USE_TESTING_FEATURE ? [{
href: 'test',
label: 'Test',
icon: PlayIcon,
requiresProject: true
},
}] : []),
...(useRag ? [{
href: 'sources',
label: 'RAG',