fix: Add Portugese, Brazil to language options (#2164)

* Add Portugese, Brazil to language options

* Upgrade date-fns package

Co-authored-by: Tom Moor <tom.moor@gmail.com>
This commit is contained in:
Saumya Pandey
2021-06-10 06:12:14 +05:30
committed by GitHub
parent a99f6bed42
commit a6d4d4ea36
27 changed files with 85 additions and 70 deletions

View File

@@ -1,5 +1,5 @@
// @flow
import distanceInWordsToNow from "date-fns/distance_in_words_to_now";
import { formatDistanceToNow } from "date-fns";
import invariant from "invariant";
import { observer } from "mobx-react";
import { GlobeIcon, PadlockIcon } from "outline-icons";
@@ -118,9 +118,12 @@ function SharePopover({ document, share, sharedParent, onSubmit }: Props) {
<>
.{" "}
{t("The shared link was last accessed {{ timeAgo }}.", {
timeAgo: distanceInWordsToNow(share.lastAccessedAt, {
addSuffix: true,
}),
timeAgo: formatDistanceToNow(
Date.parse(share.lastAccessedAt),
{
addSuffix: true,
}
),
})}
</>
)}