@@ -5,14 +5,12 @@ import { connect } from 'react-redux';
55import PropTypes from 'prop-types' ;
66import { withTranslation } from 'react-i18next' ;
77
8- import { guidelineBoundClassNames as classNames , appBoundClassNames } from '../../boundClassNames' ;
8+ import { appBoundClassNames , guidelineBoundClassNames as classNames } from '../../boundClassNames' ;
99
1010import userShape from '../../../shapes/model/session/UserShape' ;
1111
1212import logoImage from '../images/Services-OTL.svg' ;
1313
14- import { API_URL } from '../../../const' ;
15-
1614export const getFullName = ( user ) => {
1715 // eslint-disable-next-line no-underscore-dangle
1816 const _isKorean = ( string ) => {
@@ -31,9 +29,15 @@ class Header extends Component {
3129 constructor ( props ) {
3230 super ( props ) ;
3331
32+ const isBannerVisible = localStorage . getItem ( 'isBannerVisible' ) !== 'false' ;
33+ if ( ! isBannerVisible ) {
34+ document . documentElement . style . setProperty ( '--header-height' , '55px' ) ;
35+ }
36+
3437 this . state = {
3538 isMenuOpenOnMobile : false ,
3639 noBackground : false ,
40+ isBannerVisible,
3741 } ;
3842 }
3943
@@ -84,11 +88,70 @@ class Header extends Component {
8488
8589 render ( ) {
8690 const { t, i18n } = this . props ;
87- const { isMenuOpenOnMobile, noBackground } = this . state ;
91+ const { isMenuOpenOnMobile, noBackground, isBannerVisible } = this . state ;
8892 const { user } = this . props ;
8993
9094 return (
9195 < header >
96+ { isBannerVisible && (
97+ < div
98+ style = { {
99+ width : '100%' ,
100+ height : '50px' ,
101+ backgroundColor : '#FFFF99' ,
102+ display : 'flex' ,
103+ justifyContent : 'space-between' ,
104+ alignItems : 'center' ,
105+ } } >
106+ < div > </ div >
107+ < a
108+ href = "/__switch/v4"
109+ style = { {
110+ backgroundColor : '#FFFF99' ,
111+ fontWeight : 'bold' ,
112+ textDecoration : 'none' ,
113+ color : '#5f5f5f' ,
114+ fontSize : '20px' ,
115+ display : 'flex' ,
116+ alignItems : 'center' ,
117+ } } >
118+ { t ( 'ui.button.useNewOTL' ) }
119+ < div
120+ style = { {
121+ border : '1px #5f5f5f solid' ,
122+ borderRadius : '10px' ,
123+ marginLeft : '10px' ,
124+ padding : '5px' ,
125+ } } >
126+ { t ( 'ui.button.move' ) }
127+ </ div >
128+ </ a >
129+ < button
130+ onClick = { ( ) => {
131+ this . setState ( { isBannerVisible : false } ) ;
132+ document . documentElement . style . setProperty ( '--header-height' , '55px' ) ;
133+ localStorage . setItem ( 'isBannerVisible' , 'false' ) ;
134+ } }
135+ style = { {
136+ background : 'none' ,
137+ border : 'none' ,
138+ width : '20px' ,
139+ height : '20px' ,
140+ marginRight : '10px' ,
141+ cursor : 'pointer' ,
142+ color : '#5f5f5f' ,
143+ fontSize : '18px' ,
144+ display : 'flex' ,
145+ alignItems : 'center' ,
146+ justifyContent : 'center' ,
147+ zIndex : 1000 ,
148+ padding : 0 ,
149+ } }
150+ aria-label = "close" >
151+ ✕
152+ </ button >
153+ </ div >
154+ ) }
92155 < div className = { classNames ( 'identity-bar' ) } />
93156 < div
94157 className = { classNames (
0 commit comments