Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32089020
mobile-nav.react.js
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
mobile-nav.react.js
View Options
// @flow
import
{
faTwitter
,
faGithub
}
from
'@fortawesome/free-brands-svg-icons'
;
import
{
FontAwesomeIcon
}
from
'@fortawesome/react-fontawesome'
;
import
classNames
from
'classnames'
;
import
*
as
React
from
'react'
;
import
{
NavLink
}
from
'react-router-dom'
;
import
type
{
SetState
}
from
'lib/types/hook-types.js'
;
import
css
from
'./mobile-nav.css'
;
import
typography
from
'./typography.css'
;
type
Props
=
{
+
showMobileNav
:
boolean
,
+
setShowMobileNav
:
SetState
<
boolean
>
,
};
function
MobileNav
(
props
:
Props
)
:
React
.
Node
{
const
{
showMobileNav
,
setShowMobileNav
}
=
props
;
const
navLinkClassName
=
classNames
([
typography
.
paragraph2
,
css
.
tab
]);
const
mobileNavClassName
=
classNames
({
[
css
.
mobileNav
]
:
true
,
[
css
.
activeMobileNav
]
:
showMobileNav
,
});
const
onClickTab
=
React
.
useCallback
(()
=>
{
setShowMobileNav
(
false
);
},
[
setShowMobileNav
]);
return
(
<
nav
className
=
{
mobileNavClassName
}
>
<
div
className
=
{
css
.
tabContainer
}
>
<
NavLink
to
=
"/keyservers"
exact
className
=
{
navLinkClassName
}
activeClassName
=
{
css
.
activeTab
}
>
<
div
onClick
=
{
onClickTab
}
className
=
{
css
.
tabContent
}
>
Keyserver
<
/div>
<
/NavLink>
<
/div>
<
div
className
=
{
css
.
tabContainer
}
>
<
NavLink
to
=
"/team"
exact
className
=
{
navLinkClassName
}
activeClassName
=
{
css
.
activeTab
}
>
<
div
onClick
=
{
onClickTab
}
className
=
{
css
.
tabContent
}
>
Team
<
/div>
<
/NavLink>
<
/div>
<
div
className
=
{
css
.
tabContainer
}
>
<
NavLink
to
=
"/investors"
exact
className
=
{
navLinkClassName
}
activeClassName
=
{
css
.
activeTab
}
>
<
div
onClick
=
{
onClickTab
}
className
=
{
css
.
tabContent
}
>
Investors
<
/div>
<
/NavLink>
<
/div>
<
div
className
=
{
css
.
socialIconsContainer
}
>
<
a
href
=
"https://twitter.com/commdotapp"
target
=
"_blank"
rel
=
"noreferrer"
>
<
FontAwesomeIcon
icon
=
{
faTwitter
}
className
=
{
css
.
icon
}
size
=
"1x"
/>
<
/a>
<
a
href
=
"https://github.com/CommE2E/comm"
target
=
"_blank"
rel
=
"noreferrer"
>
<
FontAwesomeIcon
icon
=
{
faGithub
}
className
=
{
css
.
icon
}
size
=
"1x"
/>
<
/a>
<
/div>
<
/nav>
);
}
export
default
MobileNav
;
File Metadata
Details
Attached
Mime Type
text/x-java
Expires
Sun, Dec 7, 7:55 AM (1 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5604748
Default Alt Text
mobile-nav.react.js (2 KB)
Attached To
Mode
rCOMM Comm
Attached
Detach File
Event Timeline
Log In to Comment