diff --git a/servers/nextjs/app/(presentation-generator)/custom-layout/components/AnthropicKeyWarning.tsx b/servers/nextjs/app/(presentation-generator)/custom-layout/components/AnthropicKeyWarning.tsx
deleted file mode 100644
index 68d8e565..00000000
--- a/servers/nextjs/app/(presentation-generator)/custom-layout/components/AnthropicKeyWarning.tsx
+++ /dev/null
@@ -1,20 +0,0 @@
-import React from "react";
-import Header from "@/components/Header";
-
-export const AnthropicKeyWarning: React.FC = () => {
- return (
-
-
-
-
-
- Please put Anthropic Key To Process The Layout
-
-
- It Only works on Anthropic(Claude-4).
-
-
-
-
- );
-};
\ No newline at end of file
diff --git a/servers/nextjs/app/(presentation-generator)/custom-layout/hooks/useAnthropicKeyCheck.ts b/servers/nextjs/app/(presentation-generator)/custom-layout/hooks/useAnthropicKeyCheck.ts
deleted file mode 100644
index e6bdd684..00000000
--- a/servers/nextjs/app/(presentation-generator)/custom-layout/hooks/useAnthropicKeyCheck.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import { useState, useEffect } from "react";
-
-export const useAnthropicKeyCheck = () => {
- const [hasAnthropicKey, setHasAnthropicKey] = useState(false);
- const [isAnthropicKeyLoading, setIsAnthropicKeyLoading] = useState(true);
-
- useEffect(() => {
- fetch("/api/has-anthropic-key")
- .then((res) => res.json())
- .then((data) => {
- setHasAnthropicKey(data.hasKey);
- setIsAnthropicKeyLoading(false);
- });
- }, []);
-
- return { hasAnthropicKey, isAnthropicKeyLoading };
-};
\ No newline at end of file
diff --git a/servers/nextjs/app/(presentation-generator)/custom-layout/page.tsx b/servers/nextjs/app/(presentation-generator)/custom-layout/page.tsx
index 377175dc..eabe6e06 100644
--- a/servers/nextjs/app/(presentation-generator)/custom-layout/page.tsx
+++ b/servers/nextjs/app/(presentation-generator)/custom-layout/page.tsx
@@ -9,9 +9,9 @@ import { useFontManagement } from "./hooks/useFontManagement";
import { useFileUpload } from "./hooks/useFileUpload";
import { useSlideProcessing } from "./hooks/useSlideProcessing";
import { useLayoutSaving } from "./hooks/useLayoutSaving";
-import { useAnthropicKeyCheck } from "./hooks/useAnthropicKeyCheck";
+import { useOpenAIKeyCheck } from "./hooks/useOpenAIKeyCheck";
import { LoadingSpinner } from "./components/LoadingSpinner";
-import { AnthropicKeyWarning } from "./components/AnthropicKeyWarning";
+import { OpenAIKeyWarning } from "./components/OpenAIKeyWarning";
import { FileUploadSection } from "./components/FileUploadSection";
import { SaveLayoutButton } from "./components/SaveLayoutButton";
import { SaveLayoutModal } from "./components/SaveLayoutModal";
@@ -22,7 +22,7 @@ const CustomLayoutPage = () => {
const { refetch } = useLayout();
// Custom hooks for different concerns
- const { hasAnthropicKey, isAnthropicKeyLoading } = useAnthropicKeyCheck();
+ const { hasOpenAIKey, isOpenAIKeyLoading } = useOpenAIKeyCheck();
const { selectedFile, handleFileSelect, removeFile } = useFileUpload();
const { slides, setSlides, completedSlides } = useCustomLayout();
const { fontsData, UploadedFonts, uploadFont, removeFont, getAllUnsupportedFonts, setFontsData } = useFontManagement();
@@ -58,13 +58,13 @@ const CustomLayoutPage = () => {
};
// Loading state
- if (isAnthropicKeyLoading) {
- return ;
+ if (isOpenAIKeyLoading) {
+ return ;
}
- // Anthropic key warning
- if (!hasAnthropicKey) {
- return ;
+ // OpenAI key warning
+ if (!hasOpenAIKey) {
+ return ;
}
return (