mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-28 20:53:24 +10:00
Add open flag to all listing prop types
This commit is contained in:
parent
ad48ea3343
commit
63e06d0701
5 changed files with 5 additions and 16 deletions
|
|
@ -164,7 +164,7 @@ ManageListingsPageComponent.propTypes = {
|
|||
currentUser: propTypes.currentUser,
|
||||
currentUserHasListings: bool.isRequired,
|
||||
isAuthenticated: bool.isRequired,
|
||||
listings: arrayOf(propTypes.ownListing),
|
||||
listings: arrayOf(propTypes.listing),
|
||||
logoutError: instanceOf(Error),
|
||||
notificationCount: number,
|
||||
onCloseListing: func.isRequired,
|
||||
|
|
|
|||
|
|
@ -116,6 +116,7 @@ exports[`OrderPage matches snapshot 1`] = `
|
|||
"lat": 40,
|
||||
"lng": 60,
|
||||
},
|
||||
"open": true,
|
||||
"price": Money {
|
||||
"amount": 5500,
|
||||
"currency": "USD",
|
||||
|
|
|
|||
|
|
@ -120,6 +120,7 @@ exports[`SalePage matches snapshot 1`] = `
|
|||
"lat": 40,
|
||||
"lng": 60,
|
||||
},
|
||||
"open": true,
|
||||
"price": Money {
|
||||
"amount": 5500,
|
||||
"currency": "USD",
|
||||
|
|
|
|||
|
|
@ -106,21 +106,6 @@ export const image = shape({
|
|||
|
||||
// Denormalised listing object
|
||||
export const listing = shape({
|
||||
id: uuid.isRequired,
|
||||
type: value('listing').isRequired,
|
||||
attributes: shape({
|
||||
title: string.isRequired,
|
||||
description: string.isRequired,
|
||||
address: string.isRequired,
|
||||
geolocation: latlng.isRequired,
|
||||
price: money,
|
||||
}),
|
||||
author: user,
|
||||
images: arrayOf(image),
|
||||
});
|
||||
|
||||
// Denormalised listing object
|
||||
export const ownListing = shape({
|
||||
id: uuid.isRequired,
|
||||
type: value('listing').isRequired,
|
||||
attributes: shape({
|
||||
|
|
@ -131,6 +116,7 @@ export const ownListing = shape({
|
|||
open: bool.isRequired,
|
||||
price: money,
|
||||
}),
|
||||
author: user,
|
||||
images: arrayOf(image),
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -70,6 +70,7 @@ export const createListing = (id, author = null, price = new Money(5500, 'USD'))
|
|||
type: 'listing',
|
||||
attributes: {
|
||||
title: `${id} title`,
|
||||
open: true,
|
||||
price,
|
||||
description: `${id} description`,
|
||||
address: `${id} address`,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue