fix: change ticket timestamp display to PTBR format

This commit is contained in:
canove
2020-08-06 21:02:36 -03:00
parent c56a9cf0c2
commit f0fb5f5972
2 changed files with 4 additions and 5 deletions

View File

@@ -248,8 +248,7 @@ const Tickets = () => {
}, [ticketId, userId, history]); }, [ticketId, userId, history]);
const loadMore = () => { const loadMore = () => {
if (loading) return; setPageNumber(prevState => prevState + 1);
setPageNumber(prevPageNumber => prevPageNumber + 1);
}; };
const updateTickets = ({ ticket }) => { const updateTickets = ({ ticket }) => {
@@ -362,8 +361,8 @@ const Tickets = () => {
return ( return (
<InfiniteScroll <InfiniteScroll
pageStart={0} pageStart={0}
loadMore={loadMore} loadMore={() => !loading && loadMore()}
hasMore={!(tickets.length === count)} hasMore={count > tickets.length}
useWindow={false} useWindow={false}
initialLoad={false} initialLoad={false}
threshold={100} threshold={100}

View File

@@ -149,7 +149,7 @@ const TicketsList = ({
{isSameDay(parseISO(ticket.updatedAt), new Date()) ? ( {isSameDay(parseISO(ticket.updatedAt), new Date()) ? (
<>{format(parseISO(ticket.updatedAt), "HH:mm")}</> <>{format(parseISO(ticket.updatedAt), "HH:mm")}</>
) : ( ) : (
<>{format(parseISO(ticket.updatedAt), "MM/dd/yyyy")}</> <>{format(parseISO(ticket.updatedAt), "dd/MM/yyyy")}</>
)} )}
</Typography> </Typography>
)} )}