generated from fahricansecer/boilerplate-fe
This commit is contained in:
@@ -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.");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user