feat: automatically detect hour format

This commit is contained in:
Elias Schneider
2022-10-16 20:21:35 +02:00
parent 13d6f05b98
commit 4e3f6be8e3
5 changed files with 8 additions and 24 deletions

View File

@@ -62,11 +62,9 @@ const Body = ({ share }: { share: Share }) => {
{/* If our share.expiration is timestamp 0, show a different message */}
{moment(share.expiration).unix() === 0
? "This share will never expire."
: `This share will expire on ${
publicRuntimeConfig.TWELVE_HOUR_TIME === "true"
? moment(share.expiration).format("MMMM Do YYYY, h:mm a")
: moment(share.expiration).format("MMMM DD YYYY, HH:mm")
}`}
: `This share will expire on ${moment(share.expiration).format(
"LLL"
)}`}
</Text>
<Button