Files
hamed 194ffd889c feat: enhance security by implementing HttpOnly refresh tokens and in-memory access token management
- Added isomorphic-dompurify for improved XSS protection
- Refactored token storage to use in-memory management for access tokens
- Implemented server-side route handlers for OAuth token management
- Introduced security headers in next.config.js
- Removed client-side exposure of client_secret and sensitive tokens
- Updated API interceptors to handle token refresh logic
- Cleaned up cookie management for refresh tokens
2026-06-20 13:10:17 +03:30

35 lines
1.3 KiB
JavaScript

import { getStateInfo } from "@/lib/getStateInfo";
import Footer from "./footer";
import Header from "./header";
import { cookies } from "next/headers";
async function StLayout({ children, name }) {
const { matchedCity } = await getStateInfo();
const cookieStore = await cookies();
const isLogged = Boolean(cookieStore.get("userInfo"));
return (
<div>
<main className="w-full min-h-screen">
<header className="w-full sticky bg-[#FFF] !z-[70] shadow-[0px_1px_24.8px_0px_rgba(204,_204,_204,_0.18)] mt-[12px] sm:mt-[21px] md:mt-[30px] lg:mt-[40px] top-0 right-1/2">
<div className="w-full padding-responsive">
<Header matchedCity={matchedCity} name={name} logged={isLogged} />
</div>
</header>
<section className="opacity-page -mt-[calc(48px_+_12px)] sm:-mt-[calc(56px_+_21px)] md:-mt-[calc(64px_+_30px)] lg:-mt-[calc(80px_+_40px)]">
{children}
</section>
</main>
<footer className="bg-[#F5F5F5] mt-[100px] bg-banner-footer !bg-center !bg-no-repeat !bg-cover">
<div className="pt-[44px] bg-[rgba(255,255,255,0.45)]">
<div className="padding-responsive">
<Footer matchedCity={matchedCity} />
</div>
</div>
</footer>
</div>
);
}
export default StLayout;