refactor: convert config variables to upper case
This commit is contained in:
@@ -45,7 +45,7 @@ const Dropzone = ({
|
||||
return (
|
||||
<div className={classes.wrapper}>
|
||||
<MantineDropzone
|
||||
maxSize={parseInt(config.get("maxFileSize"))}
|
||||
maxSize={parseInt(config.get("MAX_FILE_SIZE"))}
|
||||
onReject={(e) => {
|
||||
toast.error(e[0].errors[0].message);
|
||||
}}
|
||||
@@ -75,7 +75,7 @@ const Dropzone = ({
|
||||
<Text align="center" size="sm" mt="xs" color="dimmed">
|
||||
Drag'n'drop files here to start your share. We can accept
|
||||
only files that are less than{" "}
|
||||
{byteStringToHumanSizeString(config.get("maxFileSize"))} in size.
|
||||
{byteStringToHumanSizeString(config.get("MAX_FILE_SIZE"))} in size.
|
||||
</Text>
|
||||
</div>
|
||||
</MantineDropzone>
|
||||
|
||||
@@ -29,8 +29,8 @@ const showCreateUploadModal = (
|
||||
modals: ModalsContextProps,
|
||||
options: {
|
||||
isUserSignedIn: boolean;
|
||||
allowUnauthenticatedShares: boolean;
|
||||
emailRecipientsEnabled: boolean;
|
||||
ALLOW_UNAUTHENTICATED_SHARES: boolean;
|
||||
ENABLE_EMAIL_RECIPIENTS: boolean;
|
||||
},
|
||||
uploadCallback: (
|
||||
id: string,
|
||||
@@ -62,14 +62,14 @@ const CreateUploadModalBody = ({
|
||||
) => void;
|
||||
options: {
|
||||
isUserSignedIn: boolean;
|
||||
allowUnauthenticatedShares: boolean;
|
||||
emailRecipientsEnabled: boolean;
|
||||
ALLOW_UNAUTHENTICATED_SHARES: boolean;
|
||||
ENABLE_EMAIL_RECIPIENTS: boolean;
|
||||
};
|
||||
}) => {
|
||||
const modals = useModals();
|
||||
|
||||
const [showNotSignedInAlert, setShowNotSignedInAlert] = useState(
|
||||
options.emailRecipientsEnabled
|
||||
options.ENABLE_EMAIL_RECIPIENTS
|
||||
);
|
||||
|
||||
const validationSchema = yup.object().shape({
|
||||
@@ -230,7 +230,7 @@ const CreateUploadModalBody = ({
|
||||
{ExpirationPreview({ form })}
|
||||
</Text>
|
||||
<Accordion>
|
||||
{options.emailRecipientsEnabled && (
|
||||
{options.ENABLE_EMAIL_RECIPIENTS && (
|
||||
<Accordion.Item value="recipients" sx={{ borderBottom: "none" }}>
|
||||
<Accordion.Control>Email recipients</Accordion.Control>
|
||||
<Accordion.Panel>
|
||||
|
||||
Reference in New Issue
Block a user