Browse Source

some new changes

Alex 5 years ago
parent
commit
e9edee13d1

+ 18 - 8
package-lock.json

@@ -2994,7 +2994,8 @@
             },
             "ansi-regex": {
               "version": "2.1.1",
-              "bundled": true
+              "bundled": true,
+              "optional": true
             },
             "aproba": {
               "version": "1.2.0",
@@ -3359,7 +3360,8 @@
             },
             "safe-buffer": {
               "version": "5.1.2",
-              "bundled": true
+              "bundled": true,
+              "optional": true
             },
             "safer-buffer": {
               "version": "2.1.2",
@@ -3407,6 +3409,7 @@
             "strip-ansi": {
               "version": "3.0.1",
               "bundled": true,
+              "optional": true,
               "requires": {
                 "ansi-regex": "^2.0.0"
               }
@@ -3445,11 +3448,13 @@
             },
             "wrappy": {
               "version": "1.0.2",
-              "bundled": true
+              "bundled": true,
+              "optional": true
             },
             "yallist": {
               "version": "3.0.3",
-              "bundled": true
+              "bundled": true,
+              "optional": true
             }
           }
         },
@@ -7053,7 +7058,8 @@
             },
             "ansi-regex": {
               "version": "2.1.1",
-              "bundled": true
+              "bundled": true,
+              "optional": true
             },
             "aproba": {
               "version": "1.2.0",
@@ -7418,7 +7424,8 @@
             },
             "safe-buffer": {
               "version": "5.1.2",
-              "bundled": true
+              "bundled": true,
+              "optional": true
             },
             "safer-buffer": {
               "version": "2.1.2",
@@ -7466,6 +7473,7 @@
             "strip-ansi": {
               "version": "3.0.1",
               "bundled": true,
+              "optional": true,
               "requires": {
                 "ansi-regex": "^2.0.0"
               }
@@ -7504,11 +7512,13 @@
             },
             "wrappy": {
               "version": "1.0.2",
-              "bundled": true
+              "bundled": true,
+              "optional": true
             },
             "yallist": {
               "version": "3.0.3",
-              "bundled": true
+              "bundled": true,
+              "optional": true
             }
           }
         }

+ 1 - 1
src/components/specialists/MoreInfo.js

@@ -22,7 +22,7 @@ export class MoreInfo extends React.Component {
                                 <p className = "highlights">{doctor.profession}</p>
                                 <p className = "highlights">Опыт работы более {new Date().toISOString().split('T')[0].split('-')[0] - doctor.experience.split('T')[0].split('-')[0]}  лет</p>
                                 {doctor.skillsDescription.split ("<br>").map ( (el, index) => (  <p key= {index}> { el } </p>)  ) }
-                                 {match.params.flag === 'true' && <Link to={`/appointment/${doctor._id}`} className = "btn link">Записаться на приём</Link>}
+                                 {match.params.flag === 'true' && <Link to={`/appointment/${doctor._id}/false`} className = "btn link">Записаться на приём</Link>}
                              </div>
                         </div>
                     </div>}

+ 1 - 1
src/containers/auth.js

@@ -55,7 +55,7 @@ class Auth extends Component {
                 <div className="auth__additional-content">
                   {auth ? (
                     <p className="auth__text">
-                    У вас есть акаунт ? {" "}
+                    У вас нет акаунта ? {" "}
                       <span className="auth__toggle-span" onClick={this.toggleAuth}>
                         Зарегистрироваться
                       </span>

+ 3 - 0
src/privateRouter.js

@@ -11,6 +11,9 @@ export const PrivateRoute = ({ component: Component, protectedRoute, ...rest })
 				if (!token) {
 					return <Redirect to="/auth" />;
 				}
+				if(!props.location.key){
+					return <Redirect to="/user" />
+				}
 
 				return <Component {...props} />;
 			}

+ 1 - 1
src/style/all.scss

@@ -15,7 +15,7 @@ body {
 	background-image: url(../assets/images/fon6.jpg);
 	background-size: cover;
 	background-attachment: fixed;
-	min-height: 80vh;
+	min-height: 100vh;
 	scroll-behavior: smooth;
 }
 

+ 3 - 8
src/style/auth.scss

@@ -10,15 +10,13 @@ $opacity-color: rgba(17,17,17,0.8);
 	background-color: $opacity-color;
 	min-height: 100vh;
 	@media (max-width: 1024px) {
-		min-height: 84vh;
+		min-height: 100vh;
 	}
 }
 
 .auth {
 	width: 100%;
 	height: 100%;
-
-
 	&__content {
 		width: 28rem;
 		position: absolute;
@@ -33,15 +31,12 @@ $opacity-color: rgba(17,17,17,0.8);
 			top: 35%;
 		}
 	}
-	
-
 	&__text {
-		font-size: 1.6rem;
+		font-size: 1.2rem;
 		color:	$hover-color;
 	}
 
 	&__toggle-span {
-		font-size: 1.6rem;
 		font-weight: bold;
 		color: rgb(102, 104, 223);
 		margin-left: 20px;
@@ -117,7 +112,7 @@ $opacity-color: rgba(17,17,17,0.8);
 	&__input {
 		font-family: inherit;
 		
-		font-size: 1.5rem;
+		font-size: 1em;
 		padding: 0.5rem 1rem;
 		border-radius: 2px;
 		background-color: rgba(255, 255, 255, 0.5);

+ 1 - 1
src/style/user.scss

@@ -32,7 +32,7 @@
 
 .user-orders {
   display: flex;
-  justify-content: space-between;
+  // justify-content: space-between;
   align-items: flex-start;
   flex-wrap: wrap;
   margin-top: 20px;