update src/views/Blog/index.js

master
Reza_ashrafi 3 years ago
parent 7ddec90ccd
commit f128c15c5e
  1. 28
      src/views/Blog/index.js

@ -15,7 +15,6 @@ import { useParams } from "react-router-dom";
import arrow from "../../assets/icons/dropdown-blue.svg";
export const Blog = ({
isMobile,
getInfo,
blog,
setHeaderOptions,
@ -80,10 +79,8 @@ export const Blog = ({
return (
<div className="flex flex-col lg:w-11/12 mx-auto lg:py-24 lg:px-0 px-4 lg:pb-0 pb-24 ">
<Hashtags />
{isMobile && (
<div
className="w-full rounded-md overflow-hidden relative"
className="flex lg:hidden w-full rounded-md overflow-hidden relative"
style={{
minHeight: 200,
}}
@ -117,8 +114,7 @@ export const Blog = ({
</div>
</div>
</div>
)}
{!isMobile && (
<div
className="w-full hidden lg:flex"
style={{
@ -130,13 +126,13 @@ export const Blog = ({
backgroundPosition: "center bottom",
}}
></div>
)}
<div className="flex lg:my-5 gap-5">
<strong className="flex-1 lg:text-5xl lg:font-black dark:text-gray-200">
{blog?.title}
</strong>
{!isMobile && (
<div className="flex flex-col">
{/* desktop */}
<div className="hidden lg:flex flex-col">
<div className="flex">
<Avatar size={60} />
<div className="flex flex-col py-2 mr-2 justify-center">
@ -157,25 +153,25 @@ export const Blog = ({
</span>
</div>
</div>
)}
{/* desktop */}
</div>
<div
className="leading-8 lg:text-base text-sm dark:text-white"
dangerouslySetInnerHTML={{ __html: blog?.text }}
/>
<Header title={window.t("پیشنهادی")} />
{isMobile ? (
<div className="w-full flex overflow-x-scroll no-scrollbar gap-4">
{/* mobile */}
<div className="lg:hidden w-full flex overflow-x-scroll no-scrollbar gap-4">
{blogs.map((blog, index) => (
<New blog={blog} key={index} />
))}
</div>
) : (
<div className="w-full relative" style={{ direction: "ltr" }}>
{/* mobile */}
{/* desktop */}
<div className="hidden lg:flex w-full relative ltr">
<suggestionSlider />
</div>
)}
{/* desktop */}
</div>
);
};

Loading…
Cancel
Save