Added granular control of expiration + 12/24 hour modes
This commit is contained in:
@@ -14,6 +14,9 @@ import { useRouter } from "next/router";
|
||||
import { Copy } from "tabler-icons-react";
|
||||
import { Share } from "../../types/share.type";
|
||||
import toast from "../../utils/toast.util";
|
||||
import getConfig from "next/config";
|
||||
|
||||
const {publicRuntimeConfig} = getConfig();
|
||||
|
||||
const showCompletedUploadModal = (
|
||||
modals: ModalsContextProps,
|
||||
@@ -62,7 +65,10 @@ 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 ${moment(share.expiration).format("LLL")}`}
|
||||
: `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")}`}
|
||||
</Text>
|
||||
|
||||
<Button
|
||||
|
||||
Reference in New Issue
Block a user