1
1
import React from 'react'
2
2
import { Component } from 'react' ;
3
-
3
+ import Loading from './Loading' ;
4
4
class CustomerProfile extends Component {
5
5
constructor ( props ) {
6
6
super ( props ) ;
@@ -10,65 +10,72 @@ class CustomerProfile extends Component {
10
10
if ( this . props . customer != null ) {
11
11
Customer = this . props . customer
12
12
}
13
-
14
- return (
13
+ if ( this . props . isLoading === true ) {
14
+ return (
15
+ < Loading />
16
+ ) ;
17
+ }
18
+ else {
19
+ return (
15
20
16
- < div className = "container-fluid" >
17
- < div className = "row" >
18
- < div className = "col-12 container-fluid" >
19
- < h2 className = "feature-heading container-fluid" > Profile</ h2 >
20
- < hr className = "feature-line" />
21
+ < div className = "container-fluid" >
22
+ < div className = "row" >
23
+ < div className = "col-12 container-fluid" >
24
+ < h2 className = "feature-heading container-fluid" > Profile</ h2 >
25
+ < hr className = "feature-line" />
26
+ </ div >
21
27
</ div >
22
- </ div >
23
- < div className = "row mb-4" >
24
- < div className = "col-12" >
25
- < div className = "card" >
26
- < div className = "card-header color text-white" >
27
- < h2 >
28
- { Customer !== null && Customer . Customer_Username } 's Profile
29
- </ h2 >
30
- </ div >
31
- < div className = "card-body" >
32
- < div className = "row d-flex justify-content-start" >
33
-
34
- < h5 className = "card-title col-sm-3 " > Name:</ h5 >
35
- < h5 className = "card-title col-sm-3 " > { Customer !== null && Customer . Name } </ h5 >
36
-
37
- < h5 className = "card-title col-sm-3 " > Mobile Number:</ h5 >
38
- < h5 className = "card-title col-sm-3" > { Customer !== null && Customer . mobileNo } </ h5 >
39
-
40
- </ div >
41
-
42
- < div className = "row d-flex justify-content-start" >
43
-
44
- < h5 className = "card-title col-sm-3 " > City:</ h5 >
45
- < h5 className = "card-title col-sm-3" > { Customer !== null && Customer . City } </ h5 >
46
-
47
- < h5 className = "card-title col-sm-3 " > Gender:</ h5 >
48
- < h5 className = "card-title col-sm-3" > { Customer !== null && Customer . Gender } </ h5 >
49
-
50
- </ div >
51
-
52
-
53
- < div className = "row d-flex justify-content-start" >
54
-
55
- < h5 className = "card-title col-sm-3" > Email:</ h5 >
56
- < h5 className = "card-title col-sm" > { Customer !== null && Customer . email } </ h5 >
57
-
28
+ < div className = "row mb-4" >
29
+ < div className = "col-12" >
30
+ < div className = "card" >
31
+ < div className = "card-header color text-white" >
32
+ < h2 >
33
+ { Customer !== null && Customer . Customer_Username } 's Profile
34
+ </ h2 >
58
35
</ div >
59
-
60
- < div className = "row d-flex justify-content-start" >
36
+ < div className = "card-body" >
37
+ < div className = "row d-flex justify-content-start" >
38
+
39
+ < h5 className = "card-title col-sm-3 " > Name:</ h5 >
40
+ < h5 className = "card-title col-sm-3 " > { Customer !== null && Customer . Name } </ h5 >
41
+
42
+ < h5 className = "card-title col-sm-3 " > Mobile Number:</ h5 >
43
+ < h5 className = "card-title col-sm-3" > { Customer !== null && Customer . mobileNo } </ h5 >
44
+
45
+ </ div >
46
+
47
+ < div className = "row d-flex justify-content-start" >
48
+
49
+ < h5 className = "card-title col-sm-3 " > City:</ h5 >
50
+ < h5 className = "card-title col-sm-3" > { Customer !== null && Customer . City } </ h5 >
51
+
52
+ < h5 className = "card-title col-sm-3 " > Gender:</ h5 >
53
+ < h5 className = "card-title col-sm-3" > { Customer !== null && Customer . Gender } </ h5 >
54
+
55
+ </ div >
61
56
62
- < h5 className = "card-title col-sm-3" > Address:</ h5 >
63
- < h5 className = "card-title col-sm-3" > { Customer !== null && Customer . Address } </ h5 >
57
+
58
+ < div className = "row d-flex justify-content-start" >
59
+
60
+ < h5 className = "card-title col-sm-3" > Email:</ h5 >
61
+ < h5 className = "card-title col-sm" > { Customer !== null && Customer . email } </ h5 >
62
+
63
+ </ div >
64
+
65
+ < div className = "row d-flex justify-content-start" >
66
+
67
+ < h5 className = "card-title col-sm-3" > Address:</ h5 >
68
+ < h5 className = "card-title col-sm-3" > { Customer !== null && Customer . Address } </ h5 >
69
+ </ div >
70
+
64
71
</ div >
65
-
66
72
</ div >
67
73
</ div >
68
74
</ div >
69
75
</ div >
70
- </ div >
71
- )
76
+ ) ;
77
+ }
78
+
72
79
}
73
80
}
74
81
0 commit comments