-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathheader.jsx
More file actions
90 lines (87 loc) · 3.03 KB
/
header.jsx
File metadata and controls
90 lines (87 loc) · 3.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
import React, { useEffect, useState } from 'react';
import SearchInputBox from './SearchInputBox';
import tsLogo from '../components/images/testsigma-logo-v3-dark.svg';
const Header = () => {
const [isHomepage, setIsHomepage] = useState(false);
useEffect(() => {
setIsHomepage(window.location.pathname === '/tutorials/');
}, []);
return (
<header id='root_header'>
<div className='flex items-stretch header-container'>
<a href={'/'} className='logo-block flex max-w-sm w-1/6'>
<img src={tsLogo} alt='Testsigma' className='ml-10 my-6' />
</a>
<nav className='flex-auto flex items-center'>
<nav className='flex w-7/12'>
<div className='flex items-stretch font-semibold ml-20'>
<a
className='btn btn-ghost btn-sm pr-2 rounded-btn'
href={'/docs/'}
>
Docs
</a>
{isHomepage ? (
<span className='btn btn-ghost btn-sm border-b-2 border-primary_teal_green rounded-btn ml-10 text-primary_teal_green'>
Tutorials
</span>
) : (
<a
className='btn btn-ghost btn-sm border-b-2 border-primary_teal_green rounded-btn ml-10 text-primary_teal_green'
href='/tutorials/'
>
Tutorials
</a>
)}
<a
className='btn btn-ghost btn-sm rounded-btn ml-10'
target={'_blank'}
href={'https://github.com/Testsigmahq/testsigma/'}
>
GitHub
</a>
<a
className='btn btn-ghost btn-sm rounded-btn ml-10'
href={'https://discord.com/invite/5caWS7R6QX'}
>
Discord
</a>
<a
className='btn btn-ghost btn-sm rounded-btn ml-10'
href={'https://testsigma.com/pricing'}
>
Enterprise
</a>
<a
className='btn btn-ghost btn-sm rounded-btn ml-10'
href={'https://testsigma.com/'}
>
Testsigma Cloud
</a>
</div>
</nav>
<div className='search-block relative flex items-center justify-between w-2/5 pr-9'>
<SearchInputBox></SearchInputBox>
<a
id={'signup-btn'}
target={'_blank'}
className='border border-primary_teal_green px-4 py-1.5 text-secondary_teal_green rounded'
href='/signup'
>
GET STARTED FREE
</a>
<a
id={'signup-btn'}
target={'_blank'}
className='border border-primary_teal_green px-4 py-1.5 base-teal-gradient text-white rounded'
href='/request-demo'
>
BOOK A DEMO
</a>
</div>
</nav>
</div>
</header>
);
};
export default Header;