reza added some change

master
RezaAshrafi77 3 years ago
parent be2401b918
commit 1a994a6a10
  1. 2
      src/components/PrivateRouter/index.js
  2. 2
      src/redux/reducers/public.tsx
  3. 23
      src/router.js
  4. 13
      src/views/Auth/Login/index.scss
  5. 4
      src/views/Home/Blogs/Blog/index.scss
  6. 3
      src/views/Home/Blogs/index.scss
  7. 2
      src/views/Home/Blogs/index.tsx
  8. 4
      src/views/Home/Books/index.tsx
  9. 9
      src/views/Home/Courses/index.tsx

@ -12,7 +12,7 @@ const PrivateRouter = ({
<Route
{...rest}
render={(props) =>
1 ? (
status ? (
<Component {...props} />
) : (
<Redirect to="/login" />

@ -1,5 +1,7 @@
import { PublicAction } from "../actions-type";
import proxy from '../proxy';
const initialState = {
status : proxy.status(),
homeData: [],
newProducts: [],
levels: [],

@ -3,6 +3,7 @@ import {
BrowserRouter as Router,
Route,
Switch,
Redirect,
} from "react-router-dom";
import { connect } from "react-redux";
@ -14,18 +15,20 @@ import Subscription from "./views/Subscription/index";
import Contact from "./views/Contact/index";
import Faq from "./views/Faq/index";
import PrivateRouter from "./components/PrivateRouter/index";
import proxy from "./redux/proxy";
function router({ status }) {
const home = (
<Route path="/">{proxy.status() ? <Home /> : <Auth page="signup" />}</Route>
);
return (
<Router>
<Switch>
{home}
<PrivateRouter restricted={false} component={Home} path="/" exact />
<Route exact path={"/sign-up"}>
<Auth page="signup" />
</Route>
<Route exact path={"/login"}>
<Auth page="login" />
</Route>
<Route exact path={"/profile"}>
<Auth page="profile" />
</Route>
@ -35,8 +38,18 @@ function router({ status }) {
path="/courses/:id"
exact
/>
<PrivateRouter restricted={false} component={VideoTube} path="/video-tube" exact />
<PrivateRouter restricted={false} component={Subscription} path="/subscribe" exact />
<PrivateRouter
restricted={false}
component={VideoTube}
path="/video-tube"
exact
/>
<PrivateRouter
restricted={false}
component={Subscription}
path="/subscribe"
exact
/>
<Route exact path={"/contact"}>
<Contact />
</Route>

@ -35,11 +35,6 @@
bottom: 0px;
left: 0px;
}
&__back{
img{
transform: rotate(-90deg);
}
}
}
@media screen and (min-width: 1441px) {
@ -78,6 +73,9 @@
}
&__back {
margin-bottom: 60px;
img{
transform: rotate(-90deg);
}
a {
color: white;
font-size: 13px;
@ -197,6 +195,9 @@
}
&__back {
margin-bottom: 40px;
img{
transform: rotate(-90deg);
}
a {
color: white;
font-size: calc(100vw / 110);
@ -511,6 +512,7 @@
font-family: numeralLight;
font-size: calc(100vw / 20);
background-color: #2A2A2A;
border-radius: 10px;
&:focus{
border: 0.2px solid #84de56 !important;
border-radius: 10px;
@ -546,7 +548,6 @@
letter-spacing: -1px;
font-size: calc(100vw / 30);
z-index: 110;
border-radius: 50%;
}
.Mui-focused {
color: rgba(0, 0, 0, 1) !important;

@ -76,8 +76,8 @@
@media screen and (max-width: 640px) {
.home-blogs-blog {
width: 100vw;
height: calc(100vw / 2.2);
width: 100%;
height: 150px;
margin: 10px 0px 0px;
h2 {
font-family: numeralLight;

@ -108,9 +108,6 @@
display: flex !important;
justify-content: flex-end !important;
align-items: center !important;
& img{
height: 200px !important;
}
margin: 0px 0px 100px 0px !important;
width : 100% !important;
}

@ -37,7 +37,7 @@ function Blogs(props: any) {
showArrows={false}
pagination={false}
>
{list?.map((item: Object, i: Number) => (
{list.map((item: Object, i: Number) => (
<Blog data={item} key={i} />
))}
</Carousell>

@ -31,13 +31,13 @@ function Books({list, number}: any) {
showArrows={true}
pagination={false}
>
{list.map((item: Object, i: Number) => (
{list?.map((item: Object, i: Number) => (
<Book data={item} key={i} />
))}
</Carousel>
) : (
<div className="home-books__list d-flex">
{list.map((item: Object, i: Number) => (
{list?.map((item: Object, i: Number) => (
<Book data={item} key={i} />
))}
</div>

@ -3,9 +3,10 @@ import Carousel from "react-elastic-carousel";
import Course from "./Course/index";
import { Link } from "react-router-dom";
import ExpandMoreRoundedIcon from "@mui/icons-material/ExpandMoreRounded";
import {connect} from 'react-redux';
import "./index.scss";
export default function Courses({number, courses} : any) {
function Courses({number, courses, selectedSort} : any) {
const slideNumberHandler = () => {
if (window.innerWidth >= 1440) {
return 4;
@ -21,7 +22,7 @@ export default function Courses({number, courses} : any) {
<section className="home-courses d-flex flex-column">
<header className="d-flex justify-content-between">
<div className="d-flex flex-column">
<h1>جدیدترین دورهها</h1>
<h1>{selectedSort}</h1>
<span>در این قسمت شاید یک متن جهت زیباسازی قرار بگیرد.</span>
</div>
<Link to="/">
@ -58,3 +59,7 @@ export default function Courses({number, courses} : any) {
</section>
);
}
export default connect((state : any) => ({
selectedSort : state.book.selectedSort,
}))(Courses)
Loading…
Cancel
Save