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.
 
 
 

45 lines
1.2 KiB

import React from "react";
import { Link } from "react-router-dom";
import "./index.scss";
const grades = [
window.t("اول"),
window.t("دوم"),
window.t("سوم"),
window.t("چهارم"),
window.t("پنجم"),
window.t("ششم"),
window.t("هفتم"),
window.t("هشتم"),
window.t("نهم"),
window.t("دهم"),
window.t("یازدهم"),
window.t("دوازدهم"),
];
export default function LastQR(props) {
const { data } = props;
return (
<>
{window.innerWidth > 1000 ? <div className="last-qr"></div> : null}
{window.innerWidth < 1000 ? (
<Link to={`/qr${data.link}`} className="mobile-last-qr d-flex">
<div className="mobile-last-qr__right d-flex">
<img
src={`https://dnvn.ir/api/v1/file/${data.fileIds}`}
alt={data.name}
/>
<div className="d-flex flex-column">
<strong>{data.name}</strong>
<span>{grades[data.gradeId]}</span>
</div>
</div>
<div className="mobile-last-qr__left d-flex">
<button>صفحه {data.pagesNum}</button>
</div>
</Link>
) : null}
</>
);
}