Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Jay Mehta
/
zango-frontend
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Registry
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit 1da2081c
authored
2024-06-12 15:51:04 +0530
by
Chetan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
gift card and wishlist no data found and skeleton
1 parent
4e0139fe
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
38 additions
and
16 deletions
components/gift-card/GiftCard.js
components/user/MyGiftCard.js
components/user/MyWhishList.js
pages/user/giftcard/index.js
pages/user/wishlist/index.js
redux/actions/userActions.js
components/gift-card/GiftCard.js
View file @
1da2081
...
...
@@ -89,13 +89,13 @@ const GiftCard = () => {
<
div
className
=
"col-md-7"
>
{
isStep1
&&
(
<
div
className
=
"gift-card-rt"
>
<
div
className
=
"back-btn"
>
{
/*
<div className="back-btn">
<a href="">
<span className="image-container">
<Image layout="fill" alt="" className="image img-fluid" src="/images/icons/arrow-left-02.svg" />
</span>
</a>
<
/div
>
</div>
*/
}
<
Formik
initialValues
=
{{
customAmt
:
""
,
...
...
components/user/MyGiftCard.js
View file @
1da2081
...
...
@@ -25,8 +25,9 @@ const MyGiftCard = () => {
<
div
className
=
"col-12 col-lg-12 form-container content-wraaper"
>
<
h2
className
=
"px-2 px-lg-0"
>
My
Gift
Card
<
/h2
>
<
div
className
=
"row"
>
{
giftCard
?.
length
>
0
&&
giftCard
.
map
((
data
,
index
)
=>
(
{
giftCard
?.
length
>
0
?
<>
{
giftCard
.
map
((
data
,
index
)
=>
(
<
div
className
=
"col-12 col-lg-4 px-4 px-lg-3"
key
=
{
`1
${
index
}
`
}
>
<
div
className
=
"card-booking"
>
<
div
className
=
"card-booking-img bgGrey"
>
...
...
@@ -53,7 +54,11 @@ const MyGiftCard = () => {
<
/div
>
<
/div
>
<
/div
>
))}
))}
<
/
>
:
<>
<
p
className
=
"mb-5"
>
No
Item
Found
<
/p
>
<
/>
}
<
/div
>
<
/div
>
<
/div
>
...
...
components/user/MyWhishList.js
View file @
1da2081
This diff is collapsed.
Click to expand it.
pages/user/giftcard/index.js
View file @
1da2081
import
React
from
"react"
;
import
React
,
{
useEffect
}
from
"react"
;
import
Layout
from
"../../../components/layout/Layout"
;
import
MyGiftCard
from
"../../../components/user/MyGiftCard"
;
import
{
getGiftCard
}
from
"../../../redux/actions/giftCardAction"
;
import
{
wrapper
}
from
"../../../redux/store"
;
import
{
useDispatch
}
from
"react-redux"
;
import
{
getCurrentEndUser
}
from
"../../../redux/actions/userActions"
;
export
default
function
UserGiftCardPage
()
{
export
default
function
UserGiftCardPage
()
{
const
dispatch
=
useDispatch
()
useEffect
(()
=>
{
dispatch
(
getCurrentEndUser
())
},
[])
return
(
<
Layout
>
...
...
@@ -17,10 +23,10 @@ export default function UserGiftCardPage () {
export
const
getServerSideProps
=
wrapper
.
getServerSideProps
(
store
=>
async
({
req
,
query
})
=>
{
try
{
// await store.dispatch(getGiftCard())
return
{
props
:
{},
};
return
{
props
:
{},
};
}
catch
(
error
)
{
}
});
\ No newline at end of file
pages/user/wishlist/index.js
View file @
1da2081
...
...
@@ -9,8 +9,19 @@ export default function UserProfilePage() {
return
(
<
Layout
>
{
loading
?
(
<
div
>
<
Skeleton
active
/>
<
div
className
=
"container"
>
<
div
className
=
"py-5"
>
<
div
className
=
"row"
>
{[
1
,
2
,
3
].
map
(()
=>
(
<
div
className
=
"col-lg-3 col-md-4 col-sm-12"
>
<
div
className
=
"d-inline-flex flex-column"
>
<
Skeleton
.
Button
active
style
=
{{
height
:
250
,
width
:
290
}}
/
>
<
Skeleton
.
Button
active
style
=
{{
marginTop
:
10
,
width
:
120
}}
/
>
<
/div
>
<
/div
>
))}
<
/div
>
<
/div
>
<
/div
>
)
:
(
<
MyWhishList
data
=
{
wishlists
}
/
>
...
...
redux/actions/userActions.js
View file @
1da2081
...
...
@@ -407,7 +407,7 @@ export const getCurrentEndUser = () => async dispatch => {
if
(
!
session
)
{
return
;
}
//
console.log("session action", session);
console
.
log
(
"session action"
,
session
);
dispatch
({
type
:
GET_END_USER_REQUEST
});
...
...
@@ -421,7 +421,7 @@ export const getCurrentEndUser = () => async dispatch => {
const
query
=
{
populate
:
[
"user"
],
filter
:
{
filter
s
:
{
user
:
{
id
:
{
$eq
:
session
.
id
...
...
@@ -435,7 +435,7 @@ export const getCurrentEndUser = () => async dispatch => {
});
console
.
log
(
"querystring"
,
query
);
const
response
=
await
axios
.
get
(
`
${
process
.
env
.
NEXT_PUBLIC_BACKEND_API_URL
}
/api/end-users/?
${
queryString
}
`
,
config
);
console
.
log
(
"response"
,
response
);
console
.
log
(
"response
enduser
"
,
response
);
dispatch
({
type
:
GET_END_USER_SUCCESS
,
payload
:
response
.
data
.
data
[
0
]
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment