generated from fahricansecer/boilerplate-fe
This commit is contained in:
@@ -5,3 +5,4 @@ node_modules
|
|||||||
certificates
|
certificates
|
||||||
|
|
||||||
.env.local
|
.env.local
|
||||||
|
.pnpm-store
|
||||||
@@ -58,7 +58,7 @@ export default function DocumentToVideoPage() {
|
|||||||
|
|
||||||
const handleGenerate = async () => {
|
const handleGenerate = async () => {
|
||||||
if (!file) {
|
if (!file) {
|
||||||
toast.error("Lütfen bir belge seçin.");
|
toast("error", "Lütfen bir belge seçin.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -71,10 +71,10 @@ export default function DocumentToVideoPage() {
|
|||||||
targetDuration: duration,
|
targetDuration: duration,
|
||||||
});
|
});
|
||||||
|
|
||||||
toast.success("Belge → Video projesi oluşturuldu!");
|
toast("success", "Belge → Video projesi oluşturuldu!");
|
||||||
router.push(`/dashboard/projects/${result.id}`);
|
router.push(`/dashboard/projects/${result.id}`);
|
||||||
} catch (error) {
|
} 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 () => {
|
const handleGenerate = async () => {
|
||||||
if (!youtubeUrl.includes("youtube.com") && !youtubeUrl.includes("youtu.be")) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -67,10 +67,10 @@ export default function YoutubeToVideoPage() {
|
|||||||
targetDuration: duration,
|
targetDuration: duration,
|
||||||
});
|
});
|
||||||
|
|
||||||
toast.success("YouTube → Video projesi oluşturuldu!");
|
toast("success", "YouTube → Video projesi oluşturuldu!");
|
||||||
router.push(`/dashboard/projects/${result.id}`);
|
router.push(`/dashboard/projects/${result.id}`);
|
||||||
} catch (error) {
|
} 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';
|
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);
|
export const apiClient = createApiClient(API_URL);
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user