You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.1 KiB
43 lines
1.1 KiB
import React from "react"; |
|
import Breadcrumbs from "@material-ui/core/Breadcrumbs"; |
|
import { Link } from "react-router-dom"; |
|
|
|
import "./index.scss"; |
|
|
|
const maxDesktopSize = 1250; |
|
|
|
const fontSize = { |
|
desktop: window.innerWidth > maxDesktopSize ? 12 : window.innerWidth / 90, |
|
mobile: window.innerWidth > maxDesktopSize ? 14 : window.innerWidth / 25, |
|
}; |
|
|
|
export default function ActiveLastBreadcrumb() { |
|
return ( |
|
<Breadcrumbs |
|
aria-label="breadcrumb" |
|
style={{ direction: window.lang === "en" ? "ltr" : "" }} |
|
> |
|
<Link |
|
to={"/"} |
|
style={{ |
|
fontSize: |
|
window.innerWidth > 1000 ? fontSize.desktop : fontSize.mobile, |
|
}} |
|
// onClick={handleClick} |
|
> |
|
{window.t("صفحه اصلی")}{" "} |
|
</Link> |
|
<Link |
|
to={"/products"} |
|
style={{ |
|
fontSize: |
|
window.innerWidth > 1000 ? fontSize.desktop : fontSize.mobile, |
|
color: "#00CC69", |
|
}} |
|
// onClick={handleClick} |
|
> |
|
{window.t("محصولات")}{" "} |
|
</Link> |
|
</Breadcrumbs> |
|
); |
|
}
|
|
|