Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
cicer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Quique
cicer
Commits
ecc354d9
Commit
ecc354d9
authored
4 years ago
by
meskio
Browse files
Options
Downloads
Patches
Plain Diff
Activate the head entries
parent
8f9bdfa9
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/App.js
+1
-1
1 addition, 1 deletion
src/App.js
src/Head.js
+4
-2
4 additions, 2 deletions
src/Head.js
with
5 additions
and
3 deletions
src/App.js
+
1
−
1
View file @
ecc354d9
...
@@ -13,8 +13,8 @@ import Head from './Head';
...
@@ -13,8 +13,8 @@ import Head from './Head';
function
Panel
(
props
)
{
function
Panel
(
props
)
{
return
(
return
(
<
div
>
<
div
>
<
Head
onLogout
=
{
props
.
onLogout
}
/
>
<
BrowserRouter
>
<
BrowserRouter
>
<
Head
onLogout
=
{
props
.
onLogout
}
/
>
<
Switch
>
<
Switch
>
<
Route
path
=
"
/members
"
>
<
Route
path
=
"
/members
"
>
<
MemberList
/>
<
MemberList
/>
...
...
This diff is collapsed.
Click to expand it.
src/Head.js
+
4
−
2
View file @
ecc354d9
import
React
,
{
useContext
}
from
'
react
'
;
import
React
,
{
useContext
}
from
'
react
'
;
import
mano
from
'
./mano.svg
'
;
import
{
Navbar
,
Nav
,
NavDropdown
,
Button
,
Form
}
from
'
react-bootstrap
'
;
import
{
Navbar
,
Nav
,
NavDropdown
,
Button
,
Form
}
from
'
react-bootstrap
'
;
import
{
useLocation
}
from
'
react-router-dom
'
;
import
mano
from
'
./mano.svg
'
;
import
AuthContext
from
'
./AuthContext
'
;
import
AuthContext
from
'
./AuthContext
'
;
function
Head
(
props
)
{
function
Head
(
props
)
{
const
auth
=
useContext
(
AuthContext
);
const
auth
=
useContext
(
AuthContext
);
let
location
=
useLocation
();
let
adminNav
;
let
adminNav
;
if
(
auth
.
role
===
"
admin
"
)
{
if
(
auth
.
role
===
"
admin
"
)
{
...
@@ -22,7 +24,7 @@ function Head(props) {
...
@@ -22,7 +24,7 @@ function Head(props) {
<
/Navbar.Brand
>
<
/Navbar.Brand
>
<
Navbar
.
Toggle
aria
-
controls
=
"
basic-navbar-nav
"
/>
<
Navbar
.
Toggle
aria
-
controls
=
"
basic-navbar-nav
"
/>
<
Navbar
.
Collapse
id
=
"
basic-navbar-nav
"
>
<
Navbar
.
Collapse
id
=
"
basic-navbar-nav
"
>
<
Nav
className
=
"
mr-auto
"
>
<
Nav
className
=
"
mr-auto
"
activeKey
=
{
location
.
pathname
}
>
<
Nav
.
Link
href
=
"
/products
"
>
Productos
<
/Nav.Link
>
<
Nav
.
Link
href
=
"
/products
"
>
Productos
<
/Nav.Link
>
<
Nav
.
Link
href
=
"
/purchase
"
>
Comprar
<
/Nav.Link
>
<
Nav
.
Link
href
=
"
/purchase
"
>
Comprar
<
/Nav.Link
>
<
/Nav
>
<
/Nav
>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment