File tree Expand file tree Collapse file tree 1 file changed +17
-8
lines changed Expand file tree Collapse file tree 1 file changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,22 @@ type Props = {
3939 className ?: string ;
4040} ;
4141
42+ const NewLookButton = ( ) => {
43+ const currentUrl = typeof window !== 'undefined' ? window . location . href : 'https://cube.dev/docs' ;
44+ const nextUrl = currentUrl . replace ( 'cube.dev/docs' , 'cube.dev/docs-next' ) ;
45+
46+ return (
47+ < Button
48+ href = { nextUrl }
49+ target = "_blank"
50+ className = { styles . headerButton }
51+ >
52+ < Icon style = { { fontSize : '22px' } } type = "bulb" />
53+ Try out the new look!
54+ </ Button >
55+ ) ;
56+ }
57+
4258const Header : React . FC < Props > = ( props ) => (
4359 < Layout . Header className = { props . className } >
4460 < div className = { styles . searchDimmer } > </ div >
@@ -58,14 +74,7 @@ const Header: React.FC<Props> = (props) => (
5874 { /* Community*/ }
5975 { /*</Button>*/ }
6076
61- < Button
62- href = "https://cube.dev/docs-next"
63- target = "_blank"
64- className = { styles . headerButton }
65- >
66- < Icon style = { { fontSize : '22px' } } type = "bulb" />
67- Try out the new look!
68- </ Button >
77+ < NewLookButton />
6978
7079 < Button
7180 href = "https://slack.cube.dev/"
You can’t perform that action at this time.
0 commit comments