Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
hummartapp
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Muhammad Ameen
hummartapp
Commits
861fcedb
Commit
861fcedb
authored
May 20, 2022
by
Muhammad Ameen
💻
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
firebase deploy
parent
b74f6ee7
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
90 additions
and
7 deletions
+90
-7
hosting.YnVpbGQ.cache
.firebase/hosting.YnVpbGQ.cache
+40
-0
.firebaserc
.firebaserc
+5
-0
firebase.json
firebase.json
+16
-0
Drawer.js
src/Components/Drawer/Drawer.js
+11
-3
Drawer.module.scss
src/Components/Drawer/Drawer.module.scss
+1
-1
Home.js
src/Screens/Home/Home.js
+1
-1
cartReducer.js
src/store/Reducers/cartReducer.js
+16
-2
No files found.
.firebase/hosting.YnVpbGQ.cache
0 → 100644
View file @
861fcedb
favicon.ico,1653031594830,b72f7455f00e4e58792d2bca892abb068e2213838c0316d6b7a0d6d16acd1955
asset-manifest.json,1653031631309,92ede2d9074d4d2e692134fe518b438d1eee9a59fff0909e02ff9c7203f2f8db
index.html,1653031631286,2390b41fde3291e889be6b0513f6deccf2e6d944b033773cd46c5472245f9930
manifest.json,1653031594833,341d52628782f8ac9290bbfc43298afccb47b7cbfcee146ae30cf0f46bc30900
logo192.png,1653031594831,caff018b7f1e8fd481eb1c50d75b0ef236bcd5078b1d15c8bb348453fee30293
robots.txt,1653031594835,391d14b3c2f8c9143a27a28c7399585142228d4d1bdbe2c87ac946de411fa9a2
logo512.png,1653031594832,191fc21360b4ccfb1cda11a1efb97f489ed22672ca83f4064316802bbfdd750e
static/js/main.b0f9432c.js.LICENSE.txt,1653031631287,29949fd59c1827721fa2d77114d42d046327ffb073701641f51e8417c77e32ff
static/media/logo.6ce24c58023cc2f8fd88fe9d219db6c6.svg,1653031631285,5f6ecf30024a00eebae8bb333ddc0f1c3d19fd8e7e6838404547f41abb63a8e8
static/media/app_store.c7b8c750b0aac4f2cad4.png,1653031631285,f50155c37c9a7b9aae1bceec9ce2aeb304262ca89b9a94b589cb72614e680021
static/media/fruitAndVegetables.14e368d23f0142a52edf.jpeg,1653031631286,619ed5e50084ab5bef984f99760c00c751894f2ee91cef0823c325072580c051
static/media/offer.a1d66bda81c3f57ffd5b.jpg,1653031631286,8de02d5be21a8758c2976535a05370292be54e8543664ba6af2aa55c83bac976
static/media/prayerMat.b45d680bce8f8053902c.jpg,1653031631286,2a924200297c2428288e30d38b9dec68d1e532817c26793232d69d34259e5add
static/media/bestPrice.d49f728ef527e5bd7981.jpg,1653031631285,aa51456dabeb6c98511923cf33e0f7203e3ae604701dadbb9a47c847dfed8dd5
static/media/Poppins-Black.d8b850b920a5ef49d752.ttf,1653031631282,7e6988176defbd8f12b2d2f419d57a37492413e17efaa36da9d3e92613563895
static/media/Poppins-BlackItalic.563eda3d3407af0fb581.ttf,1653031631282,adf4afa9d526d683eae20cf3f4dc7d41b294d3c880b491c8a306527e01a76cff
static/media/Poppins-Bold.cdb29a5d7ccf57ff05a3.ttf,1653031631282,2b25219c282dc2b511dc717e6d2cc2dbd602a15786b7acf159701f17f169709d
static/media/Poppins-BoldItalic.cfb635a5111b545f5598.ttf,1653031631281,2b629c288425dcadc1b6f3dd6f6d336b3896cd74bc2846a7220efe46b3599452
static/media/Poppins-ExtraBold.01849ee091e1762a5dd5.ttf,1653031631282,f487ec93d1694fd0b33ccdbd97205c64089031db444ef1ec4a804f07ee77b749
static/media/Poppins-ExtraLight.333cb30c20e31999802a.ttf,1653031631282,ccea34684b8b652c1471f6c6e5ce0170a3875c3433df790188d2d72121123d0d
static/media/Poppins-ExtraBoldItalic.73d4495be63ad83b25cc.ttf,1653031631282,65be628568c2509c234d128daf299456b3e7de432498a50969d5456555051410
static/media/Poppins-ExtraLightItalic.dbdfd398abcbbafc022b.ttf,1653031631283,b4dbe9ae34525bc4a2fd45fe951101261f1ebd11469d19c69496c78fe7f31360
static/media/Poppins-Light.7641a0f76ca9ef6c252c.ttf,1653031631283,0489dfd0e53f494827c309ab4cfc4b9de4ac441bb2816f19f2889850924e4963
static/media/Poppins-Italic.e373f6163127e2d469af.ttf,1653031631282,93b9b71d19dd58bc9fe7f008778b4573248eddfb8dd550d5b55201e85997be80
static/media/Poppins-LightItalic.4a7d59f898225cc2f2e7.ttf,1653031631282,bd7dbc534b976b66917f3a613d945181c3d889872e1a8f00bd860e54481ccab6
static/media/Poppins-MediumItalic.89e040c6a64d18f620dc.ttf,1653031631282,b2a28a314091fd9e3e962d7cb59e54f9479623c60cd055a0a225d83e19ce71d2
static/media/Poppins-Regular.35d26b781dc5fda684cc.ttf,1653031631282,f615176f3a3b7edf54daa48faef435de8b016238911dc6824d31e93442799dd5
static/media/Poppins-SemiBold.ac8d04b620e54be9b0f0.ttf,1653031631282,9ff2d627cf726339d98799c8593117646254a33a4384092eac7df61912e02d12
static/media/Poppins-SemiBoldItalic.3524ffc3226f4578e5c5.ttf,1653031631285,6752603a5b29c70341ad377199d483cf73f5da20f1efe73526d25a0c1985232e
static/media/infinix.ea76e1f06ca6386babad.jpeg,1653031631286,5a7f9647ca0b9447e53d7440f702dc2f4c9a12423a3c0ec9b6a8bd9aee547919
static/media/playstore.b16415cb715795f94405.png,1653031631286,79a4635a33d1a52be72da4caefa3643806a44e62cc80a374740dc2bdb6208cd1
static/media/Poppins-Medium.673ed42382ab264e0bf5.ttf,1653031631282,317336af08dd76b61c0408fd9acb437d1fc0980c93b254e5cd6a5cd333b50a1b
static/media/Poppins-Thin.59ff6a729e30c99b478e.ttf,1653031631286,e53363da55b8bc62157e3aa4def2cf68e9968b78712f848dd2798154e438d9c3
static/media/Poppins-ThinItalic.9d5e661e645ce9a32fe6.ttf,1653031631286,d3cc26ce5d1acad07fcd1a5810175ef93f05037fd501f70d92958f0e07d0c0b4
static/media/mart_inner.a6356935d4c831da76ba.jpeg,1653031631286,c024e74850e450efc10bdca3e4b961889467dcc31cd20ddc99080ecd67e942e5
static/media/20_discount.778d419e68613d8bd7d0.jpeg,1653031631286,d9478efa4187d7111b417d2d2d76777f12aee1ed43ab1aa3c64ac67929b7e595
static/js/main.b0f9432c.js,1653031631309,cbf5ea23dbeb90a04bbe175c6d60bac04d94d3a060ebedc8a353866fe4a83bbf
static/css/main.46094a50.css,1653031631317,7ec57e7f8cbf572f21edbfe214f0712db56c721e8956f3f675724f25e188e162
static/css/main.46094a50.css.map,1653031631318,908b828d6ff96fc7abc62edc6a7617f2dd54931e7072091eb23797c08c326fa3
static/js/main.b0f9432c.js.map,1653031631316,f869c270771bed5affa817f7d332b7d5696fa2f73b7ef7794abb2975f81f17ae
.firebaserc
0 → 100644
View file @
861fcedb
{
"projects": {
"default": "ameen-hummart"
}
}
firebase.json
0 → 100644
View file @
861fcedb
{
"hosting"
:
{
"public"
:
"build"
,
"ignore"
:
[
"firebase.json"
,
"**/.*"
,
"**/node_modules/**"
],
"rewrites"
:
[
{
"source"
:
"**"
,
"destination"
:
"/index.html"
}
]
}
}
src/Components/Drawer/Drawer.js
View file @
861fcedb
import
React
,
{
useState
}
from
"react"
;
import
{
Drawer
}
from
"antd"
;
import
{
Drawer
}
from
"antd"
;
import
{
useDispatch
,
useSelector
}
from
"react-redux"
;
import
{
useDispatch
,
useSelector
}
from
"react-redux"
;
import
style
from
"./Drawer.module.scss"
;
import
style
from
"./Drawer.module.scss"
;
...
@@ -7,12 +8,14 @@ import {
...
@@ -7,12 +8,14 @@ import {
removeItem
,
removeItem
,
increaseQuantity
,
increaseQuantity
,
decreaseQuantity
,
decreaseQuantity
,
submitRequest
}
from
"../../store/Reducers/cartReducer"
;
}
from
"../../store/Reducers/cartReducer"
;
import
{
notification
}
from
"antd"
;
import
{
notification
}
from
"antd"
;
const
MainDrawer
=
({
visible
,
setVisible
})
=>
{
const
MainDrawer
=
({
visible
,
setVisible
})
=>
{
const
dispatch
=
useDispatch
();
const
dispatch
=
useDispatch
();
const
{
cart
,
total
}
=
useSelector
((
state
)
=>
state
.
cart
);
const
{
cart
,
total
,
loading
}
=
useSelector
((
state
)
=>
state
.
cart
);
const
[
smallScreen
,
setSmallScreen
]
=
useState
(
false
);
const
openNotification
=
()
=>
{
const
openNotification
=
()
=>
{
notification
.
success
({
notification
.
success
({
...
@@ -28,7 +31,11 @@ const MainDrawer = ({ visible, setVisible }) => {
...
@@ -28,7 +31,11 @@ const MainDrawer = ({ visible, setVisible }) => {
setVisible
(
false
);
setVisible
(
false
);
};
};
// console.log(window.innerWidth);
console
.
log
(
window
.
innerWidth
);
if
(
window
.
innerWidth
<
600
)
{
setSmallScreen
(
false
);
}
const
removeItemFromCart
=
(
item
)
=>
{
const
removeItemFromCart
=
(
item
)
=>
{
dispatch
(
removeItem
({
item
,
openNotification
}));
dispatch
(
removeItem
({
item
,
openNotification
}));
...
@@ -118,8 +125,9 @@ const MainDrawer = ({ visible, setVisible }) => {
...
@@ -118,8 +125,9 @@ const MainDrawer = ({ visible, setVisible }) => {
:
style
.
submitBtn
:
style
.
submitBtn
}
}
disabled
=
{
Object
.
values
(
cart
)?.
length
===
0
}
disabled
=
{
Object
.
values
(
cart
)?.
length
===
0
}
onClick
=
{()
=>
dispatch
(
submitRequest
())}
>
>
Submit
{
loading
?
"Submit..."
:
"Submit"
}
<
/button
>
<
/button
>
<
/Drawer
>
<
/Drawer
>
<
/
>
<
/
>
...
...
src/Components/Drawer/Drawer.module.scss
View file @
861fcedb
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
margin-bottom
:
15px
;
margin-bottom
:
15px
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
border
:
1px
solid
black
;
border
:
1px
solid
rgba
(
178
,
178
,
178
,
0
.62
)
;
position
:
relative
;
position
:
relative
;
.crossDiv
{
.crossDiv
{
position
:
absolute
;
position
:
absolute
;
...
...
src/Screens/Home/Home.js
View file @
861fcedb
...
@@ -17,7 +17,7 @@ import { notification } from "antd";
...
@@ -17,7 +17,7 @@ import { notification } from "antd";
const
Home
=
()
=>
{
const
Home
=
()
=>
{
const
dispatch
=
useDispatch
();
const
dispatch
=
useDispatch
();
const
{
cart
}
=
useSelector
((
state
)
=>
state
.
cart
);
const
{
cart
}
=
useSelector
((
state
)
=>
state
.
cart
);
const
[
visible
,
setVisible
]
=
useState
(
false
);
const
[
visible
,
setVisible
]
=
useState
(
false
);
...
...
src/store/Reducers/cartReducer.js
View file @
861fcedb
...
@@ -3,6 +3,7 @@ import { createSlice } from "@reduxjs/toolkit";
...
@@ -3,6 +3,7 @@ import { createSlice } from "@reduxjs/toolkit";
export
const
cartSlice
=
createSlice
({
export
const
cartSlice
=
createSlice
({
name
:
"cart"
,
name
:
"cart"
,
initialState
:
{
initialState
:
{
loading
:
false
,
cart
:
{},
cart
:
{},
item
:
[],
item
:
[],
total
:
0
,
total
:
0
,
...
@@ -83,9 +84,22 @@ export const cartSlice = createSlice({
...
@@ -83,9 +84,22 @@ export const cartSlice = createSlice({
state
.
cart
[
action
.
payload
?.
data
?.
id
].
counting
--
;
state
.
cart
[
action
.
payload
?.
data
?.
id
].
counting
--
;
state
.
total
=
state
.
total
-
action
.
payload
.
data
.
price
;
state
.
total
=
state
.
total
-
action
.
payload
.
data
.
price
;
},
},
submitRequest
(
state
,
action
)
{
state
.
loading
=
true
;
// setTimeout(() => {
// state.cart = {};
// state.total = 0;
// state.loading = false;
// }, 1000);
},
},
},
});
});
// each case under reducers becomes an action
// each case under reducers becomes an action
export
const
{
addCart
,
removeItem
,
increaseQuantity
,
decreaseQuantity
}
=
export
const
{
cartSlice
.
actions
;
addCart
,
removeItem
,
increaseQuantity
,
decreaseQuantity
,
submitRequest
,
}
=
cartSlice
.
actions
;
export
default
cartSlice
.
reducer
;
export
default
cartSlice
.
reducer
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment