Blueprints: More specific storage name
This makes the name for the Blueprints! feature alert more specific in the localStorage.
This commit is contained in:
parent
ea7f7168ab
commit
bc8258146a
1 changed files with 5 additions and 2 deletions
|
|
@ -4,13 +4,16 @@ import { Alert, AlertActionCloseButton, Text } from '@patternfly/react-core';
|
|||
|
||||
export const NewAlert = () => {
|
||||
const isAlertDismissed = window.localStorage.getItem(
|
||||
'imageBuilder.alertDismissed'
|
||||
'imageBuilder.newFeatureBlueprintsAlertDismissed'
|
||||
);
|
||||
const [displayAlert, setDisplayAlert] = useState(!isAlertDismissed);
|
||||
|
||||
const dismissAlert = () => {
|
||||
setDisplayAlert(false);
|
||||
window.localStorage.setItem('imageBuilder.alertDismissed', 'true');
|
||||
window.localStorage.setItem(
|
||||
'imageBuilder.newFeatureBlueprintsAlertDismissed',
|
||||
'true'
|
||||
);
|
||||
};
|
||||
|
||||
if (displayAlert) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue