Skip to content

Commit

Permalink
fix(hub-react): simplified layout template
Browse files Browse the repository at this point in the history
ref: MANAGER-15784

Signed-off-by: Jacques Larique <[email protected]>
  • Loading branch information
Jacques Larique committed Nov 21, 2024
1 parent 25d1a3b commit 9f80a2c
Showing 1 changed file with 36 additions and 44 deletions.
80 changes: 36 additions & 44 deletions packages/manager/apps/hub-react/src/pages/layout/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -213,46 +213,35 @@ export default function Layout() {
{t('manager_hub_dashboard_overview')}
</OsdsText>
)}
<div
className={`flex flex-wrap ${isLoading ? 'mt-8' : '-mx-6'}`}
>
{isLoading && (
<>
<div className="md:w-8/12 mb-6 md:mb-8 px-6 box-border">
<PaymentStatusSkeleton />
</div>
<div className="md:w-4/12 mb-6 md:mb-8 order-3 md:order-2 px-6 box-border">
<BillingSummarySkeleton data-testid="billing_summary_skeleton" />
</div>
<div className="md:w-4/12 order-4 px-6 box-border">
<OrderTrackingSkeleton data-testid="order_tracking_skeleton" />
</div>
</>
)}
{!isLoading && !isFreshCustomer && (
<>
<div className="md:w-8/12 mb-6 md:mb-8 px-6 box-border">
<Suspense fallback={<PaymentStatusSkeleton />}>
<PaymentStatus
canManageBilling={availability?.[BILLING_FEATURE]}
/>
</Suspense>
</div>
<div className="md:w-4/12 mb-6 md:mb-8 order-3 md:order-2 px-6 box-border">
<Suspense
fallback={
<BillingSummarySkeleton data-testid="billing_summary_skeleton" />
}
>
{user.enterprise ? (
<EnterpriseBillingSummary />
) : (
<BillingSummary />
)}
</Suspense>
</div>
</>
)}
<div className={`flex flex-wrap ${isLoading ? '' : '-mx-6'}`}>
<div className="md:w-8/12 mb-6 md:mb-8 px-6 box-border">
{isLoading && <PaymentStatusSkeleton />}
{!isLoading && !isFreshCustomer && (
<Suspense fallback={<PaymentStatusSkeleton />}>
<PaymentStatus
canManageBilling={availability?.[BILLING_FEATURE]}
/>
</Suspense>
)}
</div>
<div className="md:w-4/12 mb-6 md:mb-8 order-3 md:order-2 px-6 box-border">
{isLoading && (
<BillingSummarySkeleton data-testid="billing_summary_skeleton" />
)}
{!isLoading && !isFreshCustomer && (
<Suspense
fallback={
<BillingSummarySkeleton data-testid="billing_summary_skeleton" />
}
>
{user.enterprise ? (
<EnterpriseBillingSummary />
) : (
<BillingSummary />
)}
</Suspense>
)}
</div>
<div className="md:w-8/12 mb-6 md:mb-8 order-2 md:order-3 px-6 box-border">
<Suspense
fallback={
Expand All @@ -262,17 +251,20 @@ export default function Layout() {
<HubSupport />
</Suspense>
</div>
{!isLoading && !isFreshCustomer && (
<div className="md:w-4/12 order-4 px-6 box-border">
<div className="md:w-4/12 order-4 px-6 box-border">
{isLoading && (
<OrderTrackingSkeleton data-testid="order_tracking_skeleton" />
)}
{!isLoading && !isFreshCustomer && (
<Suspense
fallback={
<OrderTrackingSkeleton data-testid="order_tracking_skeleton" />
}
>
<OrderTracking />
</Suspense>
</div>
)}
)}
</div>
</div>
<div className="hub-dashboard-product">
{isLoading && <TileGridSkeleton />}
Expand Down

0 comments on commit 9f80a2c

Please sign in to comment.