mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-14 08:34:25 +03:00
Merge pull request #3816 from tylershuster/chat-dates
chat: fixes relative datestamps
This commit is contained in:
commit
da629def1e
@ -19,7 +19,7 @@ export const UnreadMarker = React.forwardRef(({ dayBreak, when }, ref) => (
|
|||||||
<Text flexShrink='0' display='block' zIndex='2' mx='4' color='blue'>New messages below</Text>
|
<Text flexShrink='0' display='block' zIndex='2' mx='4' color='blue'>New messages below</Text>
|
||||||
<Rule borderColor='blue' flexGrow='1' m='0'/>
|
<Rule borderColor='blue' flexGrow='1' m='0'/>
|
||||||
{dayBreak
|
{dayBreak
|
||||||
? <Text display='block' gray mx='4'>{moment(when).calendar()}</Text>
|
? <Text display='block' gray mx='4'>{moment(when).calendar(null, { sameElse: DATESTAMP_FORMAT })}</Text>
|
||||||
: null}
|
: null}
|
||||||
<Rule style={{ width: "calc(50% - 48px)" }} borderColor='blue' m='0' />
|
<Rule style={{ width: "calc(50% - 48px)" }} borderColor='blue' m='0' />
|
||||||
</Row>
|
</Row>
|
||||||
@ -27,7 +27,7 @@ export const UnreadMarker = React.forwardRef(({ dayBreak, when }, ref) => (
|
|||||||
|
|
||||||
export const DayBreak = ({ when }) => (
|
export const DayBreak = ({ when }) => (
|
||||||
<div className="pv3 gray2 b--gray2 flex items-center justify-center f9 w-100">
|
<div className="pv3 gray2 b--gray2 flex items-center justify-center f9 w-100">
|
||||||
<p>{moment(when).calendar()}</p>
|
<p>{moment(when).calendar(null, { sameElse: DATESTAMP_FORMAT })}</p>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user