u
This commit is contained in:
@@ -53,6 +53,33 @@ export class ArticleTile extends Tile {
|
||||
);
|
||||
}
|
||||
|
||||
renderExtra() {
|
||||
const childCount = Number(this.props.article?.childCount) || 0;
|
||||
if (childCount <= 0) return null;
|
||||
return (
|
||||
<Box
|
||||
sx={{
|
||||
position: 'absolute',
|
||||
top: 6,
|
||||
right: 6,
|
||||
zIndex: 1,
|
||||
px: 0.75,
|
||||
py: 0.25,
|
||||
borderRadius: 999,
|
||||
bgcolor: 'rgba(0, 0, 0, 0.65)',
|
||||
color: 'common.white',
|
||||
fontSize: 11,
|
||||
fontWeight: 600,
|
||||
lineHeight: 1.2,
|
||||
whiteSpace: 'nowrap',
|
||||
pointerEvents: 'none',
|
||||
}}
|
||||
>
|
||||
{childCount}
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
|
||||
render() {
|
||||
if (!this.hasPhoto()) {
|
||||
return super.render();
|
||||
@@ -87,6 +114,7 @@ export class ArticleTile extends Tile {
|
||||
}}
|
||||
/>
|
||||
</Box>
|
||||
{this.renderExtra()}
|
||||
<Box
|
||||
sx={{
|
||||
position: 'absolute',
|
||||
|
||||
Reference in New Issue
Block a user