forked from mirrors/thatmattlove-hyperglass
fix issue where if greeting is disabled, the page reloads
This commit is contained in:
parent
52f910f616
commit
cbaf102015
1 changed files with 4 additions and 1 deletions
|
|
@ -24,10 +24,13 @@ export const Greeting = (props: ModalContentProps): JSX.Element => {
|
||||||
const color = useOpposingColor(bg);
|
const color = useOpposingColor(bg);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
if (!web.greeting.enable && !web.greeting.required) {
|
||||||
|
ack(true, false);
|
||||||
|
}
|
||||||
if (!isAck && web.greeting.enable) {
|
if (!isAck && web.greeting.enable) {
|
||||||
open();
|
open();
|
||||||
}
|
}
|
||||||
}, [isAck, open, web.greeting.enable]);
|
}, [isAck, open, web.greeting.enable, web.greeting.required, ack]);
|
||||||
return (
|
return (
|
||||||
<Modal
|
<Modal
|
||||||
size="lg"
|
size="lg"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue