diff options
Diffstat (limited to 'cmd/web/js/header_footer.jsx')
-rw-r--r-- | cmd/web/js/header_footer.jsx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/cmd/web/js/header_footer.jsx b/cmd/web/js/header_footer.jsx index f11ed06..3e87c1e 100644 --- a/cmd/web/js/header_footer.jsx +++ b/cmd/web/js/header_footer.jsx | |||
@@ -12,6 +12,12 @@ class MyAccount extends React.Component { | |||
12 | } | 12 | } |
13 | } | 13 | } |
14 | 14 | ||
15 | class Admin extends React.Component { | ||
16 | render = () => { | ||
17 | return <a href="/admin"><u>Admin</u></a>; | ||
18 | } | ||
19 | } | ||
20 | |||
15 | class Logo extends React.Component { | 21 | class Logo extends React.Component { |
16 | render() { | 22 | render() { |
17 | return <div id="logo" className="w-100 h-100 align-self-center"> | 23 | return <div id="logo" className="w-100 h-100 align-self-center"> |
@@ -27,6 +33,10 @@ class Footer extends React.Component { | |||
27 | elements = []; | 33 | elements = []; |
28 | } | 34 | } |
29 | 35 | ||
36 | if (this.props.isAdmin === true) { | ||
37 | elements = elements.concat(<Admin />); | ||
38 | } | ||
39 | |||
30 | if (this.props.isLoggedIn === true) { | 40 | if (this.props.isLoggedIn === true) { |
31 | elements = elements.concat(<MyAccount />); | 41 | elements = elements.concat(<MyAccount />); |
32 | elements = elements.concat(<Signout />); | 42 | elements = elements.concat(<Signout />); |
@@ -58,6 +68,10 @@ class Header extends React.Component { | |||
58 | elements = []; | 68 | elements = []; |
59 | } | 69 | } |
60 | 70 | ||
71 | if (this.props.isAdmin === true) { | ||
72 | elements = elements.concat(<Admin />); | ||
73 | } | ||
74 | |||
61 | if (this.props.isLoggedIn === true) { | 75 | if (this.props.isLoggedIn === true) { |
62 | elements = elements.concat(<MyAccount />); | 76 | elements = elements.concat(<MyAccount />); |
63 | elements = elements.concat(<Signout />); | 77 | elements = elements.concat(<Signout />); |