Update padding in Parallax component for improved layout consistency
Some checks failed
Deploy / deploy (push) Has been cancelled

This commit is contained in:
bilalgursen
2026-07-30 03:54:31 +03:00
parent dc6d894a37
commit 2c542e7756
22 changed files with 274 additions and 133 deletions

View File

@@ -0,0 +1,23 @@
"use client";
import { type ReactNode, useSyncExternalStore } from "react";
import { createPortal } from "react-dom";
const subscribe = () => () => {};
const getClientSnapshot = () => true;
const getServerSnapshot = () => false;
/**
* Viewport'a sabit kalması gereken öğeleri, transform uygulanan sayfa
* katmanının dışına taşır. Böylece üst katmandaki scroll skew animasyonu
* `position: fixed` koordinat sistemini değiştirmez.
*/
export function ViewportPortal({ children }: { children: ReactNode }) {
const mounted = useSyncExternalStore(
subscribe,
getClientSnapshot,
getServerSnapshot,
);
return mounted ? createPortal(children, document.body) : null;
}