aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/views/Header.js
blob: b3f919b40bf49bb203c0a34c81b2cd7ff33376b8 (plain) (blame)
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
import React, {Component} from 'react';
import Typed from 'typed.js';
import './Header.scss';

class Header extends Component {

    componentDidMount() {
        const options = {
            strings: ["caronte$ "],
            typeSpeed: 50,
            cursorChar: "❚"
        };
        this.typed = new Typed(this.el, options);
    }

    componentWillUnmount() {
        this.typed.destroy();
    }

    render() {
        return (
            <header className="header container-fluid">
                <div className="row">
                    <div className="col">
                        <h1 className="header-title type-wrap">
                            <span style={{ whiteSpace: 'pre' }} ref={(el) => { this.el = el; }} />
                        </h1>
                    </div>
                    <div className="col">
                        <div className="header-buttons">
                            <button className="btn-primary">
                                 pcaps
                            </button>
                            <button className="btn-primary">
                                 rules
                            </button>
                            <button className="btn-primary">
                                 services
                            </button>
                        </div>
                    </div>
                </div>
            </header>
        )
    }
}

export default Header;