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.
28 lines
1.1 KiB
28 lines
1.1 KiB
import React, { useState } from "react"; |
|
import { Link } from "react-router-dom"; |
|
import location from "../../../util/location"; |
|
|
|
export default function Course({ data }: any) { |
|
const duration = () => { |
|
const minute = data.vodDuration % 60; |
|
const hour = Math.round(data.vodDuration / 60); |
|
return (hour > 0 ? (hour + ' ' + 'ساعت') : '') + ' ' + minute + ' ' + 'دقیقه'; |
|
} |
|
return ( |
|
<Link to={"/courses/" + location.getId()} className="courses-course d-flex"> |
|
<img src={`https://dnvn.ir/api/v1/file/${data.fileIds}`} alt="" /> |
|
<div className="d-flex flex-column justify-content-between px-3"> |
|
<div className="d-flex flex-column"> |
|
<h1>{data.name}</h1> |
|
<h2>نام نویسنده</h2> |
|
</div> |
|
|
|
<p> |
|
لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ و با استفاده |
|
از طراحان گرافیک است چاپگرها و متون بلکه روزنامه و مجله در ستون و |
|
</p> |
|
</div> |
|
<span>{duration()}</span> |
|
</Link> |
|
); |
|
}
|
|
|