import { ComponentType } from "react"

export function hideScroll(Component: ComponentType): ComponentType {
    return (props) => {
        // Check if the document object is available (for SSR compatibility)
        if (typeof document !== "undefined") {
            const style = document.createElement("style")

            style.innerHTML =
                "::-webkit-scrollbar {width: 0px};" + // WebKit-based browsers (Chrome, Safari, Opera)
                "scrollbar-width: none;" + // Firefox
                "-ms-overflow-style: none;" + // Internet Explorer and Edge
                "overflow: -moz-scrollbars-none;" // Older versions of Firefox

            document.head.appendChild(style)
        }

        return <Component {...props} />
    }
}

Best viewed on a larger screen

for full experience

CURRENTLY HOOKED ONTO

CURRENTLY HOOKED ONTO

EXPERIENCE DESIGNER

Noida

Noida

CURRENTLY HOOKED ONTO

EXPERIENCE DESIGNER

Noida

MY PROJECTS

MY WORKS