const data = {
    hostName: "/demirteknoloji"
}
const {pathname, host} = window.location;
const path = host === "localhost" ? pathname : pathname.replace(`/${host}`, "")
const pathnameWithoutHost = host === "localhost" ? path.replace(data.hostName, "") : path

const PagesControl = (page, control = true) => {
    if (control) {
        return pathnameWithoutHost === page;
    }
    return pathnameWithoutHost.includes(page);
}

export default PagesControl;
