2025-10-12 17:42:17 +00:00
|
|
|
"use client";
|
|
|
|
|
|
|
|
|
|
import React from "react";
|
|
|
|
|
import { BreadCrumbs } from "../ui/bread-crumbs";
|
|
|
|
|
import { usePathname } from "next/navigation";
|
|
|
|
|
import { useAppSelector } from "@/redux/hooks";
|
2025-11-21 06:16:42 +00:00
|
|
|
import { Title } from "../ui/Title";
|
2025-10-12 17:42:17 +00:00
|
|
|
|
|
|
|
|
interface Props {
|
|
|
|
|
title: string;
|
|
|
|
|
second?: string;
|
|
|
|
|
third?: string;
|
|
|
|
|
path?: string;
|
|
|
|
|
path2?: string;
|
|
|
|
|
cursor?: boolean;
|
|
|
|
|
children: React.ReactNode;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const LayoutWithSidebar = ({
|
|
|
|
|
title,
|
|
|
|
|
second,
|
|
|
|
|
path,
|
|
|
|
|
path2,
|
|
|
|
|
third,
|
|
|
|
|
children,
|
|
|
|
|
cursor = false,
|
|
|
|
|
}: Props) => {
|
|
|
|
|
const pathname = usePathname();
|
|
|
|
|
const lang = useAppSelector(
|
|
|
|
|
(state) => state.headerSlice.activeLang.localization
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div className="flex bg-white px-6 py-4 rounded-lg flex-col md:gap-6 gap-10 section-mb w-full">
|
|
|
|
|
<div>
|
|
|
|
|
<BreadCrumbs
|
|
|
|
|
second={
|
|
|
|
|
pathname.includes("/services")
|
|
|
|
|
? lang === "en"
|
|
|
|
|
? "Services"
|
|
|
|
|
: "Сервисы"
|
|
|
|
|
: second ?? ""
|
|
|
|
|
}
|
|
|
|
|
path={path}
|
|
|
|
|
path2={path2}
|
|
|
|
|
third={third ? third : ""}
|
|
|
|
|
/>
|
|
|
|
|
<Title text={title} />
|
|
|
|
|
</div>
|
|
|
|
|
{children}
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
};
|