File tree Expand file tree Collapse file tree
website/src/components/misc Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,22 +41,24 @@ export const CookieConsent: FC = () => {
4141 aria-describedby = "cookieconsent:desc"
4242 show = { show }
4343 >
44- < Container >
45- < Message id = "cookieconsent:desc" >
46- This website uses cookies to ensure you get the best experience on our
47- website.{ " " }
48- < LearnMoreLink to = "https://cookiesandyou.com" >
49- Learn more
50- </ LearnMoreLink >
51- </ Message >
52- < Button
53- aria-label = "dismiss cookie message"
54- role = "button"
55- onClick = { clickDismiss }
56- >
57- Got it!
58- </ Button >
59- </ Container >
44+ { show && (
45+ < Container >
46+ < Message id = "cookieconsent:desc" >
47+ This website uses cookies to ensure you get the best experience on
48+ our website.{ " " }
49+ < LearnMoreLink to = "https://cookiesandyou.com" >
50+ Learn more
51+ </ LearnMoreLink >
52+ </ Message >
53+ < Button
54+ aria-label = "dismiss cookie message"
55+ role = "button"
56+ onClick = { clickDismiss }
57+ >
58+ Got it!
59+ </ Button >
60+ </ Container >
61+ ) } { " " }
6062 </ Dialog >
6163 ) ;
6264} ;
@@ -65,11 +67,9 @@ const Dialog = styled.div<{ show: boolean }>`
6567 position: fixed;
6668 bottom: 0;
6769 z-index: 30;
68- display: ${ ( { show } ) => ( show ? "initial" : "none" ) } ;
6970 width: 100vw;
7071 background-color: #ffb806;
71- opacity: ${ ( { show } ) => ( show ? 1 : 0 ) } ;
72- transition: opacity 0.2s ease-in-out;
72+ display: ${ ( { show } ) => ( show ? "visible" : "none" ) } ;
7373` ;
7474
7575const Container = styled . div `
Original file line number Diff line number Diff line change @@ -45,21 +45,23 @@ export const Promo: FC = () => {
4545 aria-describedby = "promo:desc"
4646 show = { show }
4747 >
48- < Boundary >
49- < Container >
50- < Message id = "promo:desc" >
51- < Title > { workshop . title } </ Title >
52- < Description > { workshop . teaser } </ Description >
53- </ Message >
54- < Actions >
55- < Tickets to = { workshop . url } > Get tickets!</ Tickets >
56- < Dismiss
57- aria-label = "dismiss promo message"
58- onClick = { handleDismiss }
59- />
60- </ Actions >
61- </ Container >
62- </ Boundary >
48+ { show && (
49+ < Boundary >
50+ < Container >
51+ < Message id = "promo:desc" >
52+ < Title > { workshop . title } </ Title >
53+ < Description > { workshop . teaser } </ Description >
54+ </ Message >
55+ < Actions >
56+ < Tickets to = { workshop . url } > Get tickets!</ Tickets >
57+ < Dismiss
58+ aria-label = "dismiss promo message"
59+ onClick = { handleDismiss }
60+ />
61+ </ Actions >
62+ </ Container >
63+ </ Boundary >
64+ ) }
6365 </ Dialog >
6466 ) ;
6567} ;
@@ -70,8 +72,7 @@ const Dialog = styled.div<{ show: boolean }>`
7072 z-index: 40;
7173 width: 100vw;
7274 background-color: #ffb806;
73- opacity: ${ ( { show } ) => ( show ? 1 : 0 ) } ;
74- transition: opacity 0.5s ease-in-out;
75+ display: ${ ( { show } ) => ( show ? "visible" : "none" ) } ;
7576` ;
7677
7778const Boundary = styled . div `
You can’t perform that action at this time.
0 commit comments