|
|
@@ -8,7 +8,7 @@ const ShareLinkAlert = (props) => {
|
|
|
|
|
|
|
|
|
const shareContent = document.getElementById('is-shared-page');
|
|
|
- let expiredAt = shareContent.getAttribute('data-share-link-expired-at');
|
|
|
+ const expiredAt = shareContent.getAttribute('data-share-link-expired-at');
|
|
|
const createdAt = shareContent.getAttribute('data-share-link-created-at');
|
|
|
|
|
|
function generateRatio() {
|
|
|
@@ -22,9 +22,6 @@ const ShareLinkAlert = (props) => {
|
|
|
if (expiredAt !== '') {
|
|
|
ratio = generateRatio();
|
|
|
}
|
|
|
- else {
|
|
|
- expiredAt = t('share_links.Unlimited');
|
|
|
- }
|
|
|
|
|
|
function specifyColor() {
|
|
|
let color;
|
|
|
@@ -46,8 +43,10 @@ const ShareLinkAlert = (props) => {
|
|
|
return (
|
|
|
<p className={`alert alert-${specifyColor()} py-3 px-4`}>
|
|
|
<i className="icon-fw icon-link"></i>
|
|
|
- {/* eslint-disable-next-line react/no-danger */}
|
|
|
- <span dangerouslySetInnerHTML={{ __html: t('page_page.notice.expiration', { expiredAt }) }} />
|
|
|
+ {(expiredAt === '' ? <span>{t('page_page.notice.no_deadline')}</span>
|
|
|
+ // eslint-disable-next-line react/no-danger
|
|
|
+ : <span dangerouslySetInnerHTML={{ __html: t('page_page.notice.expiration', { expiredAt }) }} />
|
|
|
+ )}
|
|
|
</p>
|
|
|
);
|
|
|
};
|