diff --git a/packages/landing/src/components/feature.updates.tsx b/packages/landing/src/components/feature.updates.tsx index c7b9e87aa..177a0a791 100644 --- a/packages/landing/src/components/feature.updates.tsx +++ b/packages/landing/src/components/feature.updates.tsx @@ -8,7 +8,7 @@ type FeatureUpdatesProps = { header: string; wrapperClass?: string; id: string; - releaseVersion: string; + dismissedKey: string; closingDate: Date; enabled: boolean; children?: ReactNode; @@ -27,30 +27,16 @@ export class FeatureUpdates extends Component= new Date(), }; } - showModal(): boolean { - if (!this.props.enabled) return false; - // Disable after closing date - if (this.props.closingDate < new Date()) return false; - // Disable if dismissed - const id = window.localStorage.getItem(this.props.id); - const releaseVersion = this.props.releaseVersion.trim(); - if (releaseVersion === id) return false; - // Disable if not same release version - const currentVersion = Config.Version.trim(); - if (Config.Version === '' || currentVersion.length <= releaseVersion.length) return false; - const versionMatch = currentVersion.slice(0, releaseVersion.length); - if (versionMatch !== releaseVersion) return false; - return true; - } - handleClose = (): void => { this.setState({ showModal: false }); - window.localStorage.setItem(this.props.id, this.props.releaseVersion); + window.localStorage.setItem(this.props.id, this.props.dismissedKey); }; override render(): ReactNode { diff --git a/packages/landing/src/components/new-features/3d.map.tsx b/packages/landing/src/components/new-features/3d.map.tsx index f2e7135d5..e840be2a2 100644 --- a/packages/landing/src/components/new-features/3d.map.tsx +++ b/packages/landing/src/components/new-features/3d.map.tsx @@ -11,8 +11,8 @@ const baseUrl = WindowUrl.baseUrl(); const bigImage = new URL('assets/Lg+3D+Maps+splash.gif', baseUrl).href; // Large gif file location const smallImage = new URL('assets/Sml+3D+map+splash.gif', baseUrl).href; // Small gif file location const closingDate = new Date('2024-10-30'); // End date for pop up screen -const dismissedKey = `DISMISSED_MODALS_LINZ_Basemaps_3D_Map`; // Optional to set as Config.Version to disable Modal as default -const releaseVersion = 'v7'; // Feature released version can both been major version or minor version +const id = `LINZ_Basemaps_3D_Map`; // Optional to set as Config.Version to disable Modal as default +const dismissedKey = 'DISMISSED_MODALS_2024_10_3d_map'; // Feature released version can both been major version or minor version const recentUpdates = { children: ( <> @@ -34,9 +34,9 @@ export class NewFeature extends Component { override render(): ReactNode { return (