fix: p7/p4 denetim bulguları — derin sayfa sıra yılı ve başlık uzunluğu, giriş sayacı, rybbit host
- derin /bolum ve /universite sayfalarında sıra aralığı hangi yıldan geldiğini söyler (2025 / 2024 / 2024–2025); 2024 sırası '2025 verisi' diye sunulmaz - <title> yuvarlanmış rakamlarla ve şablon eki olmadan ≤~86 karakter - giriş formunda tek geri sayım interval'i (çift sayaç butonu erken açıyordu) - RYBBIT_HOST sonundaki '/' atılır Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
"use client";
|
||||
|
||||
import { useState } from "react";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import { Mail } from "lucide-react";
|
||||
import { toast } from "sonner";
|
||||
import { authClient } from "@/lib/auth-client";
|
||||
@@ -40,18 +40,28 @@ export function GirisForm({ callbackURL }: { callbackURL: string }) {
|
||||
|
||||
// 60 sn: sunucunun adres başına gönderim soğumasıyla hizalı; daha kısa
|
||||
// sayaçta "Yeniden gönder" sessizce yutulur, kullanıcı gelmeyen maili bekler.
|
||||
// Tek sayaç: "E-postayı düzelt" → yeniden gönderimde eski interval durmazsa
|
||||
// iki sayaç birlikte sayar, buton sunucu soğuması bitmeden açılır.
|
||||
const sayacRef = useRef<ReturnType<typeof setInterval> | null>(null);
|
||||
function geriSayimBaslat() {
|
||||
if (sayacRef.current) clearInterval(sayacRef.current);
|
||||
setBekleme(60);
|
||||
const sayac = setInterval(() => {
|
||||
sayacRef.current = setInterval(() => {
|
||||
setBekleme((s) => {
|
||||
if (s <= 1) {
|
||||
clearInterval(sayac);
|
||||
if (sayacRef.current) clearInterval(sayacRef.current);
|
||||
sayacRef.current = null;
|
||||
return 0;
|
||||
}
|
||||
return s - 1;
|
||||
});
|
||||
}, 1000);
|
||||
}
|
||||
useEffect(() => {
|
||||
return () => {
|
||||
if (sayacRef.current) clearInterval(sayacRef.current);
|
||||
};
|
||||
}, []);
|
||||
|
||||
async function googleIleGiris() {
|
||||
setBusy("google");
|
||||
|
||||
Reference in New Issue
Block a user