Update app.db, enhance Home component with social proof feature, and improve error handling in auth module
All checks were successful
Deploy / deploy (push) Successful in 22m12s
All checks were successful
Deploy / deploy (push) Successful in 22m12s
- Updated app.db to reflect recent changes. - Added a Suspense-wrapped SosyalKanitBandi component in the Home page for improved user engagement. - Refactored the sendMagicLinkEmail function in auth.ts to handle errors more effectively, ensuring users receive appropriate feedback on email sending issues. - Removed the Rybbit live visitor widget from the site footer for a cleaner design.
This commit is contained in:
33
src/lib/sosyal-kanit-sabitler.ts
Normal file
33
src/lib/sosyal-kanit-sabitler.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* Sosyal kanıt şeridinin eşikleri ve veri tipi. Ayrı dosya, çünkü şeridin
|
||||
* istemci gövdesi de bunları okuyor; `sosyal-kanit.ts` veritabanı ve Rybbit
|
||||
* anahtarını içeri aldığı için istemci paketine girmemeli.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Liste sayısı bu eşiğin altındaysa şerit hiç gösterilmez: "12 öğrenci
|
||||
* oluşturdu" satın almaya itmez, tersine yeni/boş izlenimi verir.
|
||||
*/
|
||||
export const LISTE_ESIGI = 25;
|
||||
|
||||
/**
|
||||
* Canlı sayı bu eşiğin altındaysa canlı satır gizlenir. 1 kişi zaten
|
||||
* ziyaretçinin kendisi; "1 kişi sitede" sosyal kanıt değil, tam tersi.
|
||||
*/
|
||||
export const CANLI_ESIGI = 3;
|
||||
|
||||
/**
|
||||
* Eşikler yalnızca prod'da işler. Geliştirmede veritabanında bir avuç kayıt
|
||||
* olur; şeridi gizlemek "kod çalışmıyor" gibi görünür, oysa çalışıyor.
|
||||
*/
|
||||
export function esikGecti(sayi: number, esik: number): boolean {
|
||||
if (process.env.NODE_ENV !== "production") return sayi > 0;
|
||||
return sayi >= esik;
|
||||
}
|
||||
|
||||
export interface SosyalKanitVerisi {
|
||||
/** Üretilmiş tercih listesi sayısı. */
|
||||
liste: number;
|
||||
/** Son 30 dakikadaki ziyaretçi; kaynak yoksa null. */
|
||||
canli: number | null;
|
||||
}
|
||||
Reference in New Issue
Block a user