main
UI Deploy (Next-Auth Support) 🎨 / build-and-deploy (push) Has been cancelled

This commit is contained in:
Harun CAN
2026-04-12 15:15:43 +02:00
parent 75de91848e
commit 50b2c0d8af
5 changed files with 11 additions and 8 deletions
@@ -58,7 +58,7 @@ export default function DocumentToVideoPage() {
const handleGenerate = async () => {
if (!file) {
toast.error("Lütfen bir belge seçin.");
toast("error", "Lütfen bir belge seçin.");
return;
}
@@ -71,10 +71,10 @@ export default function DocumentToVideoPage() {
targetDuration: duration,
});
toast.success("Belge → Video projesi oluşturuldu!");
toast("success", "Belge → Video projesi oluşturuldu!");
router.push(`/dashboard/projects/${result.id}`);
} catch (error) {
toast.error("Proje oluşturulurken hata oluştu.");
toast("error", "Proje oluşturulurken hata oluştu.");
}
};
@@ -54,7 +54,7 @@ export default function YoutubeToVideoPage() {
const handleGenerate = async () => {
if (!youtubeUrl.includes("youtube.com") && !youtubeUrl.includes("youtu.be")) {
toast.error("Lütfen geçerli bir YouTube URL'si girin.");
toast("error", "Lütfen geçerli bir YouTube tam linki girin.");
return;
}
@@ -67,10 +67,10 @@ export default function YoutubeToVideoPage() {
targetDuration: duration,
});
toast.success("YouTube → Video projesi oluşturuldu!");
toast("success", "YouTube → Video projesi oluşturuldu!");
router.push(`/dashboard/projects/${result.id}`);
} catch (error) {
toast.error("Proje oluşturulurken hata oluştu.");
toast("error", "Proje oluşturulurken hata oluştu.");
}
};
+3 -1
View File
@@ -1,6 +1,8 @@
import { createApiClient } from './create-api-client';
const API_URL = process.env.NEXT_PUBLIC_API_URL || 'http://localhost:3000/api';
const API_URL = typeof window === 'undefined'
? (process.env.INTERNAL_API_URL || process.env.NEXT_PUBLIC_API_URL || 'http://localhost:3000/api')
: (process.env.NEXT_PUBLIC_API_URL || 'http://localhost:3000/api');
export const apiClient = createApiClient(API_URL);