درست کردن قسمت بلاگ ها و رفع مشکل اینکه وقتی در پایین صفحه مقالات روی یکی از مقالات میزنیم از وسط صفحه نمایش میده | 80

temp
mahdi 3 years ago
parent 76c719796c
commit 2e459a8965
  1. 9
      src/components/ButtonBetween/index.js
  2. 5
      src/views/Blog/index.js
  3. 2
      src/views/Blogs/index.js
  4. 5
      src/views/Blogs/layouts/Suggest.js
  5. 4
      src/views/Product/index.js

@ -1,7 +1,14 @@
import React from "react"; import React from "react";
import { connect } from "react-redux"; import { connect } from "react-redux";
export const ButtonBetween = ({ item, status, onClick, width, active, toggle }) => { export const ButtonBetween = ({
item,
status,
onClick,
width,
active,
toggle,
}) => {
return toggle ? ( return toggle ? (
<button <button
className={`flex justify-between items-center ${ className={`flex justify-between items-center ${

@ -41,11 +41,12 @@ export const Blog = ({
}, [activeBlog]); }, [activeBlog]);
useEffect(() => { useEffect(() => {
// alert();
window.scrollTo(0, 0); window.scrollTo(0, 0);
}, []); }, [id]);
return ( 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"> <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 /> <Hashtags />
{isMobile && ( {isMobile && (
<div <div

@ -33,7 +33,7 @@ export const Blogs = ({ isMobile, getList, blogs, setHeaderOptions }) => {
}, []); }, []);
return ( return (
<div className="flex w-full px-4 lg:px-0 flex-col lg:w-11/12 mx-auto lg:py-24 pb-24 lg:pb-0"> <div className="flex w-full px-4 lg:px-0 flex-col lg:w-11/12 mx-auto lg:py-24 pb-24 lg:pb-0 ">
<Hashtags /> <Hashtags />
<Single /> <Single />
<Header title={window.t(" تازهترینها از وبلاگ")} /> <Header title={window.t(" تازهترینها از وبلاگ")} />

@ -1,8 +1,11 @@
import React from "react"; import React, { useEffect } from "react";
import { connect } from "react-redux"; import { connect } from "react-redux";
import { Link } from "react-router-dom"; import { Link } from "react-router-dom";
export const Suggest = ({ blog }) => { export const Suggest = ({ blog }) => {
useEffect(() => {
window.scrollTo(0, 0);
}, []);
return ( return (
<Link <Link
to={"/blogs/" + blog?.id} to={"/blogs/" + blog?.id}

@ -54,7 +54,7 @@ export const Product = ({
{/* Portrait */} {/* Portrait */}
{isMobile ? ( {isMobile ? (
<div className="w-full flex flex-col bg-transparent px-4 pb-24"> <div className="w-full flex flex-col bg-transparent px-4 pb-24">
{(!book) && ( {!book && (
<div className="w-full h-screen flex justify-center items-center bg-white bg-opacity-20 backdrop-filter backdrop-blur-xl fixed left-0 top-0 z-50"> <div className="w-full h-screen flex justify-center items-center bg-white bg-opacity-20 backdrop-filter backdrop-blur-xl fixed left-0 top-0 z-50">
<Loading size={4} color="bg-green-400" /> <Loading size={4} color="bg-green-400" />
</div> </div>
@ -128,7 +128,7 @@ export const Product = ({
/> />
<a <a
href={`https://dnvn.ir/xpdf/${book?.sampleFileId}`} href={`https://dnvn.ir/xpdf/${book?.sampleFileId}`}
className="flex-1 border-2 border-solid border-green-500 bg-green-50 bg-opacity-70 rounded-sm text-tiny font-bold text-green-700 text-center" className="flex-1 border-2 border-solid text-sm border-green-500 bg-green-50 bg-opacity-70 rounded-sm font-bold text-green-700 text-center"
style={{ padding: "18px 0px" }} style={{ padding: "18px 0px" }}
> >
مشاهده نمونه مشاهده نمونه

Loading…
Cancel
Save