All checks were successful
Deploy / deploy (push) Successful in 8m4s
Added a new DELETE endpoint to allow users to clear their chat history. This functionality ensures that while the chat messages are removed, any credits spent remain intact. Additionally, updated the ListemGovde component to reflect changes in user preferences and integrated a modal for notifying users about preference changes. Enhanced the SohbetClient component to include a button for clearing chat history, improving user experience and interface clarity.
32 lines
1006 B
TypeScript
32 lines
1006 B
TypeScript
"use client";
|
||
|
||
// Liste üretiminin bekleme metinleri tek kaynakta: ilk kurulum (ListeUretici)
|
||
// ve tercih değişikliği sonrası yeniden kurulum (TercihDegistiModali) aynı
|
||
// dili ve ritmi paylaşsın diye.
|
||
|
||
import { useEffect, useState } from "react";
|
||
|
||
export const URETIM_MESAJLARI = [
|
||
"Sıralamana uygun programlar taranıyor…",
|
||
"Gerçek YÖK Atlas verisiyle dengeli liste kuruluyor…",
|
||
"Her tercih için risk ve trend analizi yazılıyor…",
|
||
"Son rötuşlar yapılıyor, neredeyse hazır…",
|
||
] as const;
|
||
|
||
const ARALIK_MS = 7000;
|
||
|
||
/** Sırayla ilerleyen, sonuncuda duran bekleme metni. Yalnızca üretim
|
||
* sürerken monte edilir — sayaç mount ile başlar. */
|
||
export function useUretimMesaji(): string {
|
||
const [idx, setIdx] = useState(0);
|
||
|
||
useEffect(() => {
|
||
const zamanlayici = setInterval(() => {
|
||
setIdx((i) => Math.min(i + 1, URETIM_MESAJLARI.length - 1));
|
||
}, ARALIK_MS);
|
||
return () => clearInterval(zamanlayici);
|
||
}, []);
|
||
|
||
return URETIM_MESAJLARI[idx];
|
||
}
|