mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-24 18:32:41 +00:00
"Rename dismissKeys to dismisskeys in Dialog component and its usage"
This commit is contained in:
@@ -2,17 +2,17 @@
|
||||
import React from "react";
|
||||
const { useRef, useEffect } = React;
|
||||
|
||||
function Dialog({ dismissKeys, closeText = 'Close', blocking = false, ...rest }) {
|
||||
function Dialog({ dismisskeys, closeText = 'Close', blocking = false, ...rest }) {
|
||||
const dialogRef = useRef(null);
|
||||
|
||||
useEffect(()=>{
|
||||
if (dismissKeys.length !== 0) {
|
||||
if (dismisskeys.length !== 0) {
|
||||
blocking ? dialogRef.current?.showModal() : dialogRef.current?.show();
|
||||
}
|
||||
}, [dialogRef.current, dismissKeys]);
|
||||
}, [dialogRef.current, dismisskeys]);
|
||||
|
||||
const dismiss = () => {
|
||||
dismissKeys.forEach(key => {
|
||||
dismisskeys.forEach(key => {
|
||||
if (key) {
|
||||
localStorage.setItem(key, 'true');
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ const NotificationPopup = ()=>{
|
||||
))
|
||||
};
|
||||
|
||||
return <Dialog className='notificationPopup' dismissKeys={dissmissKeyList} closeText={DISMISS_BUTTON} >
|
||||
return <Dialog className='notificationPopup' dismisskeys={dissmissKeyList} closeText={DISMISS_BUTTON} >
|
||||
<div className='header'>
|
||||
<i className='fas fa-info-circle info'></i>
|
||||
<h3>Notice</h3>
|
||||
|
||||
Reference in New Issue
Block a user