Skip to content

Commit

Permalink
Merge pull request #3877 from google/bug/3832-idea-hub-footer
Browse files Browse the repository at this point in the history
Remove 'Updated every 2-3 days' from saved and draft ideas tabs (3832).
  • Loading branch information
eugene-manuilov authored Aug 19, 2021
2 parents f46f548 + 8c21b26 commit b31f31e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,14 @@
*/
import PropTypes from 'prop-types';

/**
* WordPress dependencies
*/
import { __ } from '@wordpress/i18n';

/**
* Internal dependencies
*/
import { Grid, Cell, Row } from '../../../../../material-components';
import Pagination from './Pagination';

const Footer = ( { tab } ) => {
return (
const Footer = ( { tab, content } ) => {
return content ? (
<Grid className="googlesitekit-idea-hub__footer">
<Row>
<Cell
Expand All @@ -42,14 +37,18 @@ const Footer = ( { tab } ) => {
lgSize={ 6 }
className="googlesitekit-idea-hub__footer--updated"
>
{ __( 'Updated every 2-3 days', 'google-site-kit' ) }
{ content }
</Cell>

<Cell smSize={ 4 } mdSize={ 4 } lgSize={ 6 }>
<Pagination tab={ tab } />
</Cell>
</Row>
</Grid>
) : (
<div className="googlesitekit-idea-hub__footer">
<Pagination tab={ tab } />
</div>
);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,16 @@ const DashboardIdeasWidget = ( {
);
}

const WrappedFooter = () => <Footer tab={ activeTab } />;
const WrappedFooter = () => (
<Footer
tab={ activeTab }
content={
activeTab === 'new-ideas'
? __( 'Updated every 2-3 days', 'google-site-kit' )
: false
}
/>
);

return (
<Widget noPadding Footer={ WrappedFooter }>
Expand Down

0 comments on commit b31f31e

Please sign in to comment.