mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-15 10:02:47 +03:00
landscape: prevent -1 days display on tutorial
Fixes urbit/landscape#584
This commit is contained in:
parent
0e0fc807d2
commit
8f4d7da976
@ -93,7 +93,10 @@ function Group(props: GroupProps) {
|
||||
);
|
||||
const { hideUnreads } = useSettingsState(selectCalmState);
|
||||
const joined = useSettingsState(selectJoined);
|
||||
const days = Math.floor(moment.duration(moment(joined).add(14, 'days').diff(moment())).as('days'));
|
||||
const days = Math.max(0, Math.floor(moment.duration(moment(joined)
|
||||
.add(14, 'days')
|
||||
.diff(moment()))
|
||||
.as('days'))) || 0;
|
||||
return (
|
||||
<Tile ref={anchorRef} position="relative" bg={isTutorialGroup ? 'lightBlue' : undefined} to={`/~landscape${path}`} gridColumnStart={first ? '1' : null}>
|
||||
<Col height="100%" justifyContent="space-between">
|
||||
|
Loading…
Reference in New Issue
Block a user