File tree Expand file tree Collapse file tree 2 files changed +59
-0
lines changed Expand file tree Collapse file tree 2 files changed +59
-0
lines changed Original file line number Diff line number Diff line change
1
+ import { Center , Flex , Text , chakra } from '@chakra-ui/react'
2
+ import { CloseIcon } from '@chakra-ui/icons'
3
+
4
+ const Banner = ( ) => {
5
+ const dismissBanner = ( ) => {
6
+ localStorage . setItem ( 'bannerDismissed' , 'true' )
7
+ const banner = document . getElementById ( 'banner' )
8
+ if ( banner ) {
9
+ banner . style . display = 'none'
10
+ }
11
+ }
12
+
13
+ return (
14
+ < Center
15
+ py = "2"
16
+ px = "3"
17
+ bgGradient = "linear(to-r,cyan.700, purple.500)"
18
+ color = "white"
19
+ textAlign = "center"
20
+ id = "banner"
21
+ >
22
+ < Flex align = "center" fontSize = "sm" >
23
+ < Text fontWeight = "medium" maxW = { { base : '32ch' , md : 'unset' } } >
24
+ Acamdey V2 is coming soon 👀... Subscribe to our newsletter for
25
+ updates!
26
+ </ Text >
27
+ < chakra . a
28
+ flexShrink = { 0 }
29
+ href = "https://developerdao.substack.com/s/probably-nothing"
30
+ target = "_blank"
31
+ ms = "6"
32
+ bg = "blackAlpha.300"
33
+ color = "whiteAlpha.900"
34
+ fontWeight = "semibold"
35
+ px = "3"
36
+ py = "1"
37
+ rounded = "base"
38
+ >
39
+ Subscribe now!{ ' ' }
40
+ </ chakra . a >
41
+ < chakra . button
42
+ onClick = { dismissBanner }
43
+ ms = "6"
44
+ color = "whiteAlpha.900"
45
+ fontWeight = "semibold"
46
+ px = "3"
47
+ py = "1"
48
+ rounded = "base"
49
+ >
50
+ < CloseIcon />
51
+ </ chakra . button >
52
+ </ Flex >
53
+ </ Center >
54
+ )
55
+ }
56
+
57
+ export default Banner
Original file line number Diff line number Diff line change 1
1
import NavBar from '@components/NavBar'
2
2
import Footer from '@components/footer/Footer'
3
3
import { Box } from '@chakra-ui/react'
4
+ import Banner from './Banner'
4
5
5
6
const Layout = ( { children } : { children : React . ReactNode } ) => {
6
7
return (
7
8
< >
9
+ < Banner />
8
10
< NavBar />
9
11
< Box
10
12
p = "1.25em"
You can’t perform that action at this time.
0 commit comments