Skip to content

Commit

Permalink
Fix coming soon status sort.
Browse files Browse the repository at this point in the history
  • Loading branch information
allilevine committed Sep 20, 2024
1 parent 98365c8 commit 78590e1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/sites/src/use-sites-list-sorting.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ type SiteDetailsForSortingWithOptionalUserInteractions = Pick<
| 'is_deleted'
| 'is_coming_soon'
| 'is_private'
| 'launch_status'
>;

type SiteDetailsForSortingWithUserInteractions = Pick<
Expand All @@ -25,6 +26,7 @@ type SiteDetailsForSortingWithUserInteractions = Pick<
| 'is_deleted'
| 'is_coming_soon'
| 'is_private'
| 'launch_status'
> &
Required< Pick< MinimumSite, 'user_interactions' > >;

Expand Down Expand Up @@ -324,7 +326,7 @@ function getStatus( site: SiteDetailsForSorting ): string {
if ( site.options?.is_redirect ) {
return 'redirect';
}
if ( site.is_coming_soon ) {
if ( site.is_coming_soon || ( site.is_private && site.launch_status === 'unlaunched' ) ) {
return 'coming-soon';
}
if ( site.is_private ) {
Expand Down

0 comments on commit 78590e1

Please sign in to comment.