update src/components/Comments/index.js and src/components/CourseChapter/index.js

temp
mahdi 2 years ago
parent 9e1e0e5562
commit f7f61934cb
  1. 6
      src/components/Comments/index.js
  2. 19
      src/components/CourseChapter/index.js

@ -46,7 +46,7 @@ export const Comments = ({ comments, indent }) => {
<div className="flex items-center">
<strong className="text-base mr-2">{comment.userId}</strong>
<span className="text-tiny text-greenBA mr-3">
{comment?.userRoll || "خریدار محصول"}
{comment?.userRoll || `${window.t("خریدار محصول")}`}
</span>
<div className="flex flex-row items-center mr-10 font-semibold">
<StarRating />
@ -80,7 +80,7 @@ export const Comments = ({ comments, indent }) => {
<>
<img src={positiveIcon} alt="" className="w-6 ml-2" />
<span className="text-sm text-black">
برای خرید توصیه میکنم
{window.t("برای خرید توصیه میکنم")}
</span>
</>
)}
@ -88,7 +88,7 @@ export const Comments = ({ comments, indent }) => {
<>
<img src={negativeIcon} alt="" className="w-6 ml-2" />
<span className="text-sm text-black">
برای خرید توصیه نمیکنم
{window.t("بازگشت بی چون و برای خرید توصیه نمیکنم")}
</span>
</>
)}

@ -12,7 +12,7 @@ const CourseChapter = ({
selectedVideo,
userId,
setVideoActive,
isMobile
isMobile,
}) => {
const duration = (value) => {
const minute = value % 60;
@ -36,13 +36,13 @@ const CourseChapter = ({
<div className="hidden lg:flex flex-row w-full items-center justify-between">
<div>
<h2 className="text-green7B bg-opacity-5 text-base font-semibold">
سرفصل دوره
{window.t("سرفصل دوره")}
</h2>
</div>
<div className="flex flex-row-reverse items-center divide-x divide-solid transform translate-x-2">
<span className="text-green7B text-sm px-2">{book?.name}</span>
<span className="text-green7B text-sm px-2">
{"پایه" + " " + grades[book?.gradeId]}
{`${window.t("پایه")}` + " " + grades[book?.gradeId]}
</span>
</div>
</div>
@ -88,7 +88,10 @@ const CourseChapter = ({
></span>
</div>
{/* left div content */}
<div className="py-1.5" style={{ width: isMobile ? '100%' :"90%" }}>
<div
className="py-1.5"
style={{ width: isMobile ? "100%" : "90%" }}
>
<div
className={`w-full bg-white flex flex-col transition duration-400 hover:scale-95 shadow-md border border-solid border-green-200 transform rounded-md
${
@ -100,7 +103,7 @@ const CourseChapter = ({
onClick={() =>
video?.isFreeVod || +userId === 140
? setVideoActive(video)
: toast.error("ابتدا محصول رو خریداری کن!")
: toast.error(`${window.t("ابتدا محصول رو خریداری کن!")}`)
}
disabled={true}
>
@ -138,7 +141,9 @@ const CourseChapter = ({
: "text-blueC0"
}`}
>
{selectedVideo?.id === video?.id ? "در حال پخش" : "پخش"}
{selectedVideo?.id === video?.id
? `${window.t("در حال پخش")}`
: `${window.t("پخش")}`}
</span>
</div>
</div>
@ -157,7 +162,7 @@ const mapStateToProps = (state) => ({
grades: state.publicApi.grades,
// vods: state.publicApi.bookSection?.vods,
userId: state?.user?.status?.id,
isMobile: state.publicApi.isMobile
isMobile: state.publicApi.isMobile,
});
const mapDispatchToProps = {

Loading…
Cancel
Save