|
|
|
@ -1,15 +1,24 @@ |
|
|
|
|
import React from "react"; |
|
|
|
|
import {Link} from 'react-router-dom'; |
|
|
|
|
import React, { useState, useEffect } from "react"; |
|
|
|
|
import { Link } from "react-router-dom"; |
|
|
|
|
import _ from "lodash"; |
|
|
|
|
import { connect } from "react-redux"; |
|
|
|
|
|
|
|
|
|
function BookToggle({ book, theme }: any) { |
|
|
|
|
const [fade, setFade] = useState(false); |
|
|
|
|
useEffect(() => {}, []); |
|
|
|
|
useEffect(() => { |
|
|
|
|
setFade(false); |
|
|
|
|
setTimeout(() => { |
|
|
|
|
setFade(true); |
|
|
|
|
}, 500); |
|
|
|
|
}, [book]); |
|
|
|
|
return ( |
|
|
|
|
<div |
|
|
|
|
className={_.join( |
|
|
|
|
[ |
|
|
|
|
"book-toggle desktop justify-content-between align-items-center mx-auto px-2", |
|
|
|
|
theme === "light" ? "book-toggle-light" : "book-toggle-dark", |
|
|
|
|
fade ? "opacity-100" : "opacity-0", |
|
|
|
|
], |
|
|
|
|
" " |
|
|
|
|
)} |
|
|
|
@ -21,9 +30,11 @@ function BookToggle({ book, theme }: any) { |
|
|
|
|
توجه است، ناگهان با اتهامهایی جدی مواجه میشود که خود و خانواده اش را |
|
|
|
|
در موقعیت پیچیدهای قرار میدهد و... |
|
|
|
|
</p> |
|
|
|
|
<Link to={'/courses/' + book.id}>ادامه</Link> |
|
|
|
|
<Link className="book-toggle__info--link" to={"/courses/" + book.id}>ادامه</Link> |
|
|
|
|
</div> |
|
|
|
|
<Link to={"/courses/" + book.id} className="book-toggle__img"> |
|
|
|
|
<img src={`https://dnvn.ir/api/v1/file/${book.fileIds}`} alt="" /> |
|
|
|
|
</Link> |
|
|
|
|
</div> |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|