diff --git a/app/coming-soon/guardrails/page.tsx b/app/(routes)/coming-soon/guardrails/page.tsx similarity index 100% rename from app/coming-soon/guardrails/page.tsx rename to app/(routes)/coming-soon/guardrails/page.tsx diff --git a/app/coming-soon/model-testing/page.tsx b/app/(routes)/coming-soon/model-testing/page.tsx similarity index 100% rename from app/coming-soon/model-testing/page.tsx rename to app/(routes)/coming-soon/model-testing/page.tsx diff --git a/app/coming-soon/redteaming/page.tsx b/app/(routes)/coming-soon/redteaming/page.tsx similarity index 100% rename from app/coming-soon/redteaming/page.tsx rename to app/(routes)/coming-soon/redteaming/page.tsx diff --git a/app/coming-soon/text-to-speech/page.tsx b/app/(routes)/coming-soon/text-to-speech/page.tsx similarity index 100% rename from app/coming-soon/text-to-speech/page.tsx rename to app/(routes)/coming-soon/text-to-speech/page.tsx diff --git a/app/configurations/page.tsx b/app/(routes)/configurations/page.tsx similarity index 100% rename from app/configurations/page.tsx rename to app/(routes)/configurations/page.tsx diff --git a/app/configurations/prompt-editor/page.tsx b/app/(routes)/configurations/prompt-editor/page.tsx similarity index 100% rename from app/configurations/prompt-editor/page.tsx rename to app/(routes)/configurations/prompt-editor/page.tsx diff --git a/app/configurations/prompt-editor/types.ts b/app/(routes)/configurations/prompt-editor/types.ts similarity index 100% rename from app/configurations/prompt-editor/types.ts rename to app/(routes)/configurations/prompt-editor/types.ts diff --git a/app/configurations/prompt-editor/utils.ts b/app/(routes)/configurations/prompt-editor/utils.ts similarity index 100% rename from app/configurations/prompt-editor/utils.ts rename to app/(routes)/configurations/prompt-editor/utils.ts diff --git a/app/datasets/page.tsx b/app/(routes)/datasets/page.tsx similarity index 99% rename from app/datasets/page.tsx rename to app/(routes)/datasets/page.tsx index 7aa8c8f..7ead23b 100644 --- a/app/datasets/page.tsx +++ b/app/(routes)/datasets/page.tsx @@ -10,7 +10,7 @@ import { useState, useEffect } from "react"; import { useAuth } from "@/app/lib/context/AuthContext"; import { useApp } from "@/app/lib/context/AppContext"; -import type { APIKey } from "@/app/keystore/page"; +import { APIKey } from "@/app/lib/types/credentials"; import Sidebar from "@/app/components/Sidebar"; import { useToast } from "@/app/components/Toast"; diff --git a/app/document/page.tsx b/app/(routes)/document/page.tsx similarity index 99% rename from app/document/page.tsx rename to app/(routes)/document/page.tsx index 89b2eeb..01ce54f 100644 --- a/app/document/page.tsx +++ b/app/(routes)/document/page.tsx @@ -3,7 +3,7 @@ import { useState, useEffect } from "react"; import { useAuth } from "@/app/lib/context/AuthContext"; import { useApp } from "@/app/lib/context/AppContext"; -import type { APIKey } from "@/app/keystore/page"; +import { APIKey } from "@/app/lib/types/credentials"; import Sidebar from "@/app/components/Sidebar"; import { useToast } from "@/app/components/Toast"; import { formatDate } from "@/app/components/utils"; diff --git a/app/evaluations/[id]/page.tsx b/app/(routes)/evaluations/[id]/page.tsx similarity index 100% rename from app/evaluations/[id]/page.tsx rename to app/(routes)/evaluations/[id]/page.tsx diff --git a/app/evaluations/page.tsx b/app/(routes)/evaluations/page.tsx similarity index 98% rename from app/evaluations/page.tsx rename to app/(routes)/evaluations/page.tsx index 077a900..860ad57 100644 --- a/app/evaluations/page.tsx +++ b/app/(routes)/evaluations/page.tsx @@ -10,7 +10,7 @@ import { useState, useEffect, useCallback, Suspense } from "react"; import { colors } from "@/app/lib/colors"; import { useSearchParams } from "next/navigation"; -import { Dataset } from "@/app/datasets/page"; +import { Dataset } from "@/app/(routes)/datasets/page"; import Sidebar from "@/app/components/Sidebar"; import TabNavigation from "@/app/components/TabNavigation"; import { useToast } from "@/app/components/Toast"; @@ -38,6 +38,11 @@ function SimplifiedEvalContent() { const { sidebarCollapsed, setSidebarCollapsed } = useApp(); const { apiKeys } = useAuth(); const [selectedKeyId, setSelectedKeyId] = useState(""); + const [mounted, setMounted] = useState(false); + + useEffect(() => { + setMounted(true); + }, []); // Dataset creation state const [datasetName, setDatasetName] = useState(""); @@ -355,7 +360,7 @@ function SimplifiedEvalContent() { /> {/* Tab Content */} - {apiKeys.length === 0 ? ( + {!mounted || apiKeys.length === 0 ? (