Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
Main Next
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mashplace
frontend
Main Next
Commits
6ac3c622
Commit
6ac3c622
authored
2 years ago
by
Dmitry Olyenyov
Browse files
Options
Downloads
Plain Diff
Merge origin/release/v0.26 into release/v0.26-to-0.28 (using imerge)
parents
ceab8c79
b3e5b0d4
Branches
release/v0.26-to-0.28
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/features/private/dashboard/organisms/LandlordOverview/index.tsx
+17
-21
17 additions, 21 deletions
...es/private/dashboard/organisms/LandlordOverview/index.tsx
with
17 additions
and
21 deletions
src/features/private/dashboard/organisms/LandlordOverview/index.tsx
+
17
−
21
View file @
6ac3c622
...
...
@@ -58,27 +58,22 @@ const LandlordOverview: FC<Props> = ({ propertyId }) => {
[
property
?.
offers_list
,
listingId
]
);
const
activeOffer
=
useMemo
(
const
activeOffer
s
=
useMemo
(
()
=>
maxBy
(
offers_list
.
filter
(
({
state
})
=>
isAfterOfferStatus
(
state
,
Offer_Api_OfferStateEnum
.
Pending
)
&&
isBeforeOfferStatus
(
state
,
Offer_Api_OfferStateEnum
.
EarlyTermination
)
),
({
updated_at_value
})
=>
new
Date
(
updated_at_value
).
getTime
()
isBeforeOfferStatus
(
state
,
Offer_Api_OfferStateEnum
.
EarlyTermination
)
),
[
offers_list
]
);
const
filteredOffers
=
useMemo
(
()
=>
activeOffer
?
offers_list
.
filter
(
({
id
,
state
,
updated_at_value
})
=>
activeOffers
.
length
>
0
?
offers_list
.
filter
(({
id
,
state
,
updated_at_value
})
=>
activeOffers
.
some
(
(
activeOffer
)
=>
id
===
activeOffer
.
id
||
isAfter
(
new
Date
(
updated_at_value
),
...
...
@@ -86,8 +81,9 @@ const LandlordOverview: FC<Props> = ({ propertyId }) => {
)
||
state
===
Offer_Api_OfferStateEnum
.
Active
)
)
:
offers_list
,
[
activeOffer
,
offers_list
]
[
activeOffer
s
,
offers_list
]
);
const
finishedOffers
=
useMemo
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment