File tree 4 files changed +144
-115
lines changed
4 files changed +144
-115
lines changed Original file line number Diff line number Diff line change 1
- .wrappers {
1
+ .wrappers {
2
2
background-color : $container-color ;
3
+
3
4
.upper-side {
4
- display : flex ;
5
- align-items : center ;
6
- height : 10rem ;
7
- font-size : 1.5rem ;
8
- padding : 5rem ;
9
- border-bottom : 2px solid rgba (119 , 119 , 119 , 0.49 );
5
+ display : flex ;
6
+ align-items : center ;
7
+ font-size : 1.5rem ;
8
+ padding : 2rem 5rem ;
9
+ border-bottom : 2px solid rgba (119 , 119 , 119 , 0.49 );
10
+
11
+ .product-name {
12
+ font-size : 2rem ;
13
+ font-weight : 700 ;
14
+ color : $text-color ;
15
+ margin-right : 2rem ;
16
+ }
17
+
18
+ .filter-option {
19
+ display : flex ;
20
+ gap : 10rem ;
21
+
22
+ .selection-part {
23
+ display : flex ;
24
+ align-items : center ;
25
+ gap : 2rem ;
26
+ font-size : 2rem ;
27
+ font-weight : 700 ;
28
+ color : $text-color ;
29
+
30
+ }
31
+
32
+ .search-Span-price {
33
+ font-size : 2rem ;
34
+ font-weight : 700 ;
35
+ color : $text-color ;
36
+ margin-right : 2rem ;
37
+ }
38
+
39
+ .dropdown-select {
40
+
41
+ gap : 2rem ;
42
+ font-size : 2rem ;
43
+ font-weight : 700 ;
44
+ color : $text-color ;
45
+ border : 1px solid rgba (255 , 109 , 24 , 0.49 );
46
+ border-radius : 4px ;
47
+ padding : 0.5rem 2rem ;
48
+ font-size : 15px ;
49
+ cursor : pointer ;
50
+ }
51
+ }
52
+
53
+ .discount-display {
54
+ font-size : 2rem ;
55
+ display : flex ;
56
+ align-items : center ;
57
+ }
58
+ }
59
+
60
+ .product-main {
61
+ display : flex ;
62
+
63
+ .product-list {
64
+ display : flex ;
65
+ flex-wrap : wrap ;
66
+ margin : 3rem 3rem ;
67
+ margin-left : 5rem ;
68
+ gap : 3rem ;
69
+ }
70
+
71
+ .loader-spinner {
72
+ display : flex ;
73
+ justify-content : center ;
74
+ align-items : center ;
75
+ margin-left : 70rem ;
76
+ margin-top : 20rem ;
77
+ }
10
78
11
- .product-name {
12
- font-size : 2rem ;
13
- font-weight : 700 ;
14
- color : $text-color ;
15
- margin-right : 2rem ;
16
- }
79
+ .noResult {
80
+ margin : 0 auto ;
81
+ display : flex ;
82
+ flex-direction : column ;
83
+ margin-bottom : 1rem ;
17
84
18
- .filter-option {
19
- display : flex ;
20
- gap : 10rem ;
21
-
22
- .selection-part {
23
- display : flex ;
24
- align-items : center ;
25
- gap : 2rem ;
26
- font-size : 2rem ;
27
- font-weight : 700 ;
28
- color : $text-color ;
29
-
30
- }
31
- .search-Span-price {
32
- font-size : 2rem ;
33
- font-weight : 700 ;
34
- color : $text-color ;
35
- margin-right : 2rem ;
36
- }
37
- .dropdown-select {
38
-
39
- gap : 2rem ;
40
- font-size : 2rem ;
41
- font-weight : 700 ;
42
- color : $text-color ;
43
- border : 1px solid rgba (255 , 109 , 24 , 0.49 );
44
- border-radius : 4px ;
45
- padding : 0.5rem 2rem ;
46
- font-size : 15px ;
47
- cursor : pointer ;
48
- }
49
- }
50
- .discount-display {
51
- font-size : 2rem ;
52
- display : flex ;
53
- align-items : center ;
54
- }
55
- }
56
- .product-main {
57
- display : flex ;
58
- .product-list {
59
- display : flex ;
60
- flex-wrap : wrap ;
61
- margin : 3rem 3rem ;
62
- margin-left : 5rem ;
63
- gap : 3rem ;
64
- }
65
- .loader-spinner {
66
- display : flex ;
67
- justify-content : center ;
68
- align-items : center ;
69
- margin-left : 70rem ;
70
- margin-top : 20rem ;
71
- }
72
- .noResult {
73
- margin : 0 auto ;
74
- display : flex ;
75
- flex-direction : column ;
76
- margin-bottom : 1rem ;
77
- img {
78
- width : auto ;
79
- height : 400px ;
80
- }
81
- }
82
- }
85
+ img {
86
+ width : auto ;
87
+ height : 400px ;
88
+ }
89
+ }
90
+ }
83
91
}
Original file line number Diff line number Diff line change 1
1
/* eslint-disable*/
2
2
/* eslint-disable */
3
3
import React from "react" ;
4
- import { Navigate , Route , Routes } from "react-router-dom" ;
4
+ import { Navigate , Route , Routes , } from "react-router-dom" ;
5
5
import LandingPage from "./pages/LandingPage" ;
6
6
import { SignUp } from "./pages/SignUp" ;
7
7
import NotFound from "./pages/NotFound" ;
@@ -17,6 +17,7 @@ import ViewProduct from "./pages/ViewProduct";
17
17
import UserLogin from "./pages/UserLogin" ;
18
18
import SellerLogin from "./pages/SellerLogin" ;
19
19
import AdminLogin from "./pages/AdminLogin" ;
20
+ import Search from "./pages/Search" ;
20
21
21
22
const AppRouter : React . FC = ( ) => {
22
23
return (
Original file line number Diff line number Diff line change
1
+ export interface IProducts {
2
+ nextPage :number ;
3
+ currentPage : number ;
4
+ previousPage :number ;
5
+ limit :number ;
6
+ data :[ ] ;
7
+ error ?:string
8
+ }
9
+ export interface IProductsState {
10
+ searchProduct : searchProduct ;
11
+ }
12
+
1
13
/* eslint-disable @typescript-eslint/indent */
2
14
export interface IProduct {
3
- id : string ;
4
- shopId : string ;
5
- name : string ;
6
- description ?: string ;
7
- price : number ;
8
- discount ?: string ;
9
- category : string ;
10
- expiryDate ?: Date ;
11
- expired : boolean ;
12
- bonus ?: string ;
13
- images : string [ ] ;
14
- quantity : number ;
15
- status : string ;
16
- createdAt : Date ;
17
- updatedAt : Date ;
18
- productReviews : IProductReview [ ] ;
19
- shops : IShop ;
15
+ id : string ;
16
+ shopId : string ;
17
+ name : string ;
18
+ description ?: string ;
19
+ price : number ;
20
+ discount ?: string ;
21
+ category : string ;
22
+ expiryDate ?: Date ;
23
+ expired : boolean ;
24
+ bonus ?: string ;
25
+ images : string [ ] ;
26
+ quantity : number ;
27
+ status : string ;
28
+ createdAt : Date ;
29
+ updatedAt : Date ;
30
+ productReviews : IProductReview [ ] ;
31
+ shops : IShop ;
20
32
}
21
33
22
34
export interface IProductReview {
23
- id : string ;
24
- productId : string ;
25
- userId : string ;
26
- feedback : string ;
27
- rating : number ;
28
- status : boolean ;
29
- createdAt : Date ;
30
- updatedAt : Date ;
31
- user ?: {
32
- firstName ?: string ;
33
- lastName ?: string ;
34
- profilePicture ?: string ;
35
- }
35
+ id : string ;
36
+ productId : string ;
37
+ userId : string ;
38
+ feedback : string ;
39
+ rating : number ;
40
+ status : boolean ;
41
+ createdAt : Date ;
42
+ updatedAt : Date ;
43
+ user ?: {
44
+ firstName ?: string ;
45
+ lastName ?: string ;
46
+ profilePicture ?: string ;
47
+ }
36
48
}
37
49
38
50
export interface IShop {
39
- id : string ;
40
- userId : string ;
41
- name : string ;
42
- description ?: string ;
43
- image ?: string ;
51
+ id : string ;
52
+ userId : string ;
53
+ name : string ;
54
+ description ?: string ;
55
+ image ?: string ;
44
56
}
Original file line number Diff line number Diff line change @@ -96,4 +96,12 @@ export interface INotificationInitialResource {
96
96
message : string | null ,
97
97
passwordExpiryMessage : string | null ,
98
98
isLoggedOut : boolean
99
- }
99
+ }
100
+
101
+ export interface SearchCriteria {
102
+ name ?: string ;
103
+ category ?: string ;
104
+ minPrice ?: number ;
105
+ maxPrice ?: number ;
106
+ discount ?: number ;
107
+ }
You can’t perform that action at this time.
0 commit comments