Some checks failed
Deploy / deploy (push) Failing after 1h28m6s
- Added new scripts for database operations and temporary production in package.json. - Integrated KaydetBannerLazy component into the layout for improved user notifications. - Enhanced API error handling in the soru route to mark credit exhaustion. - Updated the IletisimPage for better button styling and user experience. - Refactored ListemPage to streamline user flow and improve session handling. - Removed unused ListePaneli component to clean up the codebase.
20 lines
563 B
TypeScript
20 lines
563 B
TypeScript
"use client";
|
||
|
||
import { usePathname } from "next/navigation";
|
||
|
||
// Site kromunun (banner, header, üst/alt blur) gizleneceği rotalar
|
||
// (tam eşleşme veya alt yol). KaydetBanner da aynı listeye uyar.
|
||
const HIDDEN_PREFIXES = ["/giris"];
|
||
|
||
export function kromGizliMi(pathname: string) {
|
||
return HIDDEN_PREFIXES.some(
|
||
(p) => pathname === p || pathname.startsWith(`${p}/`),
|
||
);
|
||
}
|
||
|
||
export function HeaderGate({ children }: { children: React.ReactNode }) {
|
||
const pathname = usePathname();
|
||
if (kromGizliMi(pathname)) return null;
|
||
return <>{children}</>;
|
||
}
|