mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-12-06 04:25:20 +00:00
Extended release version cookie expiry till a month (#526)
This commit is contained in:
parent
cda1613a6f
commit
27f91a2b90
@ -0,0 +1,3 @@
|
|||||||
|
export const getReleaseVersionExpiry = () => {
|
||||||
|
return new Date(Date.now() + 60 * 60 * 24 * 31 * 1000);
|
||||||
|
};
|
||||||
@ -21,6 +21,7 @@ import React, { FunctionComponent, useState } from 'react';
|
|||||||
import ChangeLogs from './ChangeLogs';
|
import ChangeLogs from './ChangeLogs';
|
||||||
import FeaturesCarousel from './FeaturesCarousel';
|
import FeaturesCarousel from './FeaturesCarousel';
|
||||||
import { COOKIE_VERSION, LATEST_VERSION_ID, WHATS_NEW } from './whatsNewData';
|
import { COOKIE_VERSION, LATEST_VERSION_ID, WHATS_NEW } from './whatsNewData';
|
||||||
|
import { getReleaseVersionExpiry } from './WhatsNewModal.util';
|
||||||
// import { Button } from '../../buttons/Button/Button';
|
// import { Button } from '../../buttons/Button/Button';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
@ -56,7 +57,9 @@ export const WhatsNewModal: FunctionComponent<Props> = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
const handleCancel = () => {
|
const handleCancel = () => {
|
||||||
cookieStorage.setItem(COOKIE_VERSION, 'true');
|
cookieStorage.setItem(COOKIE_VERSION, 'true', {
|
||||||
|
expires: getReleaseVersionExpiry(),
|
||||||
|
});
|
||||||
onCancel();
|
onCancel();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user