delete 5 files and update 4 files

master
Reza_ashrafi 2 years ago
parent b6141a8a92
commit 2526bb8846
  1. 8
      public/assets/icons/barnamehnegar.svg
  2. 0
      src/components/MainFooter/Bazar.svg
  3. 0
      src/components/MainFooter/IOS.svg
  4. 0
      src/components/MainFooter/enamad-pic.svg
  5. 8
      src/components/MainFooter/index.js
  6. 0
      src/components/MainFooter/samandehi-pic.svg
  7. 43
      src/components/SimpleFooter/index.js
  8. 2
      src/redux/actions/config.js
  9. 6
      src/redux/reducers/config.js
  10. 7
      src/router.js
  11. 9
      src/views/Home/index.js

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 124 KiB

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

@ -5,8 +5,8 @@ import _ from "lodash";
import enamadlogo from "./enamad-pic.svg"; import enamadlogo from "./enamad-pic.svg";
import callIcon from "../../assets/icons/vuesax-linear-call-calling.svg"; import callIcon from "../../assets/icons/vuesax-linear-call-calling.svg";
import samandehi from "./samandehi-pic.svg"; import samandehi from "./samandehi-pic.svg";
import iosIcon from "./IOS.svg"; // import iosIcon from "./IOS.svg";
import bazarIcon from "./Bazar.svg"; // import bazarIcon from "./Bazar.svg";
const FooterDesign1 = ({ color, bg, items, hasHeader }) => { const FooterDesign1 = ({ color, bg, items, hasHeader }) => {
const enamad = const enamad =
@ -14,7 +14,7 @@ const FooterDesign1 = ({ color, bg, items, hasHeader }) => {
return ( return (
<> <>
{hasHeader ? ( {hasHeader ? (
<div className=" bg-gray-100 w-full z-20"> <div className="hidden lg:flex bg-gray-100 w-full z-20">
<div className="w-11/12 mx-auto flex items-center justify-between py-6 text-blue52"> <div className="w-11/12 mx-auto flex items-center justify-between py-6 text-blue52">
<div className="flex items-center"> <div className="flex items-center">
<div className="flex items-center ml-8 "> <div className="flex items-center ml-8 ">
@ -53,7 +53,7 @@ const FooterDesign1 = ({ color, bg, items, hasHeader }) => {
</div> </div>
) : null} ) : null}
<footer <footer
className={`flex flex-col bg-gray-200 py-16 md:justify-around items-start md:items-start relative shadow-md z-20 ${bg}`} className={`hidden lg:flex flex-col bg-gray-200 py-16 md:justify-around items-start md:items-start relative shadow-md z-20 ${bg}`}
> >
<div className="w-11/12 flex justify-between mx-auto"> <div className="w-11/12 flex justify-between mx-auto">
<div className="flex gap-10"> <div className="flex gap-10">

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

@ -0,0 +1,43 @@
import React from "react";
import { Link } from "react-router-dom";
const rightLinks = [
{
title: "سوالات متداول",
link: "/faq",
},
{
title: "درباره ما",
link: "/about-us",
},
{
title: "تماس با ما",
link: "/contact-us",
},
];
export default function SimpleFooter() {
return (
<div className="hidden lg:flex justify-between relative items-center py-3 lg:px-14 bg-white border-t border-solid border-grayDB">
<ul className="flex items-center gap-6">
{rightLinks?.map((link, index) => (
<Link className="lg:text-sm text-gray1" to={link?.link} key={index}>
{link?.title}
</Link>
))}
</ul>
<a
href="https://barnamenegar.com/"
target="_blank"
className="lg:text-sm text-gray1 ltr flex items-center gap-1"
>
Powered <br />
By Barnamehnegar
</a>
<span className="absolute left-1/2 top-1/2 transform -translate-x-1/2 -translate-y-1/2 lg:text-sm text-gray1">
تمامی حقوق این سایت متعلق به{" "}
<strong className="lg:text-tiny text-blueC0">دانوین</strong> میباشد.
</span>
</div>
);
}

@ -3,6 +3,8 @@ import proxy from "../proxy";
const config = { const config = {
setDevice: (data) => async (dispatch) => setDevice: (data) => async (dispatch) =>
await dispatch({ type: "config/setDevice", data }), await dispatch({ type: "config/setDevice", data }),
isHome: (data) => async (dispatch) =>
await dispatch({ type: "config/isHome", data }),
getAvailableForSell: getAvailableForSell:
(data = {}) => (data = {}) =>
async (dispatch) => async (dispatch) =>

@ -1,6 +1,7 @@
const initialState = { const initialState = {
device: "mobile", device: "mobile",
availableForSell: [], availableForSell: [],
isHome: false,
}; };
export default function config(state = initialState, action) { export default function config(state = initialState, action) {
@ -11,6 +12,11 @@ export default function config(state = initialState, action) {
...state, ...state,
device: data, device: data,
}; };
case "config/isHome":
return {
...state,
isHome: data,
};
case "config/availableForSell": case "config/availableForSell":
return { return {
...state, ...state,

@ -15,7 +15,8 @@ import {
import Navbar from "./components/Navbar"; import Navbar from "./components/Navbar";
import BG from "./components/BG"; import BG from "./components/BG";
import BottomNavigation from "./components/BottomNavigation"; import BottomNavigation from "./components/BottomNavigation";
import FooterDesign1 from "./components/Footer"; import MainFooter from "./components/MainFooter";
import SimpleFooter from "./components/SimpleFooter";
//pages //pages
import Home from "./views/Home"; import Home from "./views/Home";
@ -48,6 +49,7 @@ import Profile from "./views/Auth/Profile";
function Router({ function Router({
isDark, isDark,
isMobile, isMobile,
isHome,
headerOptions, headerOptions,
dialog, dialog,
menu, menu,
@ -613,7 +615,7 @@ function Router({
} }
/> />
</Routes> </Routes>
{/* {!isMobile ? <FooterDesign1 hasHeader /> : null} */} {isHome ? <MainFooter hasHeader /> : <SimpleFooter />}
</BrowserRouter> </BrowserRouter>
</div> </div>
</div> </div>
@ -623,6 +625,7 @@ function Router({
const mapStateToProps = (state) => ({ const mapStateToProps = (state) => ({
isDark: state.publicApi.isDark, isDark: state.publicApi.isDark,
isMobile: state.config.device === "mobile", isMobile: state.config.device === "mobile",
isHome: state.config.isHome,
isLogin: state.user.status, isLogin: state.user.status,
headerOptions: state.publicApi.headerOptions, headerOptions: state.publicApi.headerOptions,
dialog: state.dialog.dialog, dialog: state.dialog.dialog,

@ -3,11 +3,15 @@ import { connect } from "react-redux";
import DesktopHome from "./Desktop"; import DesktopHome from "./Desktop";
import Portrait from "./Portrait"; import Portrait from "./Portrait";
import { publicApi } from "../../redux/actions"; import { publicApi, config } from "../../redux/actions";
function Home({ setHeaderOptions, headerOptions, isMobile }) { function Home({ setHeaderOptions, headerOptions, isMobile, setIsHome }) {
useEffect(() => { useEffect(() => {
setHeaderOptions(headerOptions); setHeaderOptions(headerOptions);
setIsHome(true);
return () => {
setIsHome(false);
}
}, []); }, []);
return ( return (
@ -31,6 +35,7 @@ const mapStateToProps = (state) => ({
const mapDispatchToProps = { const mapDispatchToProps = {
setHeaderOptions: publicApi.setHeaderOptions, setHeaderOptions: publicApi.setHeaderOptions,
setIsHome: config.isHome
}; };
export default connect(mapStateToProps, mapDispatchToProps)(Home); export default connect(mapStateToProps, mapDispatchToProps)(Home);

Loading…
Cancel
Save