|
@@ -48,6 +48,12 @@ export const ShareLinkForm: FC<Props> = (props: Props) => {
|
|
|
}, []);
|
|
}, []);
|
|
|
|
|
|
|
|
const handleChangeCustomExpirationDate = useCallback((customExpirationDate: string) => {
|
|
const handleChangeCustomExpirationDate = useCallback((customExpirationDate: string) => {
|
|
|
|
|
+ // set customExpirationDate to today if the input is empty
|
|
|
|
|
+ if (customExpirationDate.length === 0) {
|
|
|
|
|
+ setCustomExpirationDate(new Date());
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
const parsedDate = parse(customExpirationDate, 'yyyy-MM-dd', new Date());
|
|
const parsedDate = parse(customExpirationDate, 'yyyy-MM-dd', new Date());
|
|
|
setCustomExpirationDate(parsedDate);
|
|
setCustomExpirationDate(parsedDate);
|
|
|
}, []);
|
|
}, []);
|
|
@@ -199,9 +205,14 @@ export const ShareLinkForm: FC<Props> = (props: Props) => {
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <button type="button" className="btn btn-primary d-block mx-auto px-5" onClick={handleIssueShareLink} data-testid="btn-sharelink-issue">
|
|
|
|
|
- {t('share_links.Issue')}
|
|
|
|
|
- </button>
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <div className="row mt-4">
|
|
|
|
|
+ <div className="col">
|
|
|
|
|
+ <button type="button" className="btn btn-primary d-block mx-auto px-5" onClick={handleIssueShareLink} data-testid="btn-sharelink-issue">
|
|
|
|
|
+ {t('share_links.Issue')}
|
|
|
|
|
+ </button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
);
|
|
);
|