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