feat: Implement text-to-video and fix hydration UI issues

This commit is contained in:
Harun CAN
2026-04-28 09:48:43 +02:00
parent 89eb9d4dfd
commit 1b69eaf219
13 changed files with 387 additions and 17 deletions
@@ -1,5 +1,6 @@
"use client";
import { useState, useEffect } from "react";
import { motion } from "framer-motion";
import {
FolderOpen,
@@ -95,6 +96,12 @@ function getStatCards(data?: typeof MOCK_STATS, creditBalance?: { balance: numbe
}
export default function DashboardPage() {
const [mounted, setMounted] = useState(false);
useEffect(() => {
setMounted(true);
}, []);
// Real API hook'ları — mock modunda çağrılmaz
const statsQuery = useDashboardStats();
const creditQuery = useCreditBalance();
@@ -106,6 +113,14 @@ export default function DashboardPage() {
const statCards = getStatCards(statsData, creditData);
if (!mounted) {
return (
<div className="flex items-center justify-center min-h-[60vh]">
<Loader2 size={32} className="animate-spin text-violet-500" />
</div>
);
}
return (
<motion.div
variants={stagger}