From c1dbb752d8ef90c9facfc59ea0915dce6c4a05a1 Mon Sep 17 00:00:00 2001 From: infiinte-persistence Date: Sat, 25 Jul 2020 15:20:31 +0800 Subject: [PATCH] RecommendedContent: Move `WaitUntilOnPage` to within the component instead. This allows `RecommendedContent` to render the Card but with an empty list, so that the area isn't totally blank while waiting for `WaitUntilOnPage` to debounce. --- ui/component/recommendedContent/view.jsx | 19 +++++++++++-------- ui/page/file/view.jsx | 4 +--- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/ui/component/recommendedContent/view.jsx b/ui/component/recommendedContent/view.jsx index 2e3dc924f..35e13e575 100644 --- a/ui/component/recommendedContent/view.jsx +++ b/ui/component/recommendedContent/view.jsx @@ -3,6 +3,7 @@ import React from 'react'; import ClaimList from 'component/claimList'; import Ads from 'web/component/ads'; import Card from 'component/common/card'; +import WaitUntilOnPage from 'component/common/wait-until-on-page'; type Options = { related_to: string, @@ -68,14 +69,16 @@ export default class RecommendedContent extends React.PureComponent { isBodyList title={__('Related')} body={ - } - empty={__('No related content found')} - /> + + } + empty={__('No related content found')} + /> + } /> ); diff --git a/ui/page/file/view.jsx b/ui/page/file/view.jsx index ee6629eb1..c947f58c7 100644 --- a/ui/page/file/view.jsx +++ b/ui/page/file/view.jsx @@ -165,9 +165,7 @@ class FilePage extends React.Component { } /> - - - + );