Skip to content

Commit af82c81

Browse files
committed
new kludge
1 parent ded857d commit af82c81

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/components/InfoBanner.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
import React from 'react';
22

33
const InfoBanner = ({ visible, onHide }) => {
4-
const relevant = window.location.href.includes('osa4') || window.location.href.includes('en/part4')
5-
6-
if (!relevant || !visible) return null;
4+
if (!visible) return null;
75

86
const style = {
97
padding: 10,

src/components/layout.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ const Layout = props => {
2323
useEffect(() => {
2424
const key = localStorage.getItem(BANNER_TO_KEY)
2525
if (!key) {
26-
setVisible(true);
26+
const relevant = window.location.href.includes('osa4') || window.location.href.includes('en/part4')
27+
setVisible(relevant);
2728
}
2829
}, []);
2930

0 commit comments

Comments
 (0)