Skip to content

Commit

Permalink
feat: Fouth task completed
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandomospf committed Nov 18, 2021
1 parent dffeae3 commit 31700b3
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions src/Components/Header/index.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component } from 'react';
import { Link } from 'react-router-dom';
import Loading from '../Loading';
import { getUser } from '../../services/userAPI';

Expand Down Expand Up @@ -34,9 +35,24 @@ class index extends Component {
<header data-testid="header-component">
{ isLoad ? <Loading />
: (
<h3 data-testid="header-user-name">
{name}
</h3>
<div>
<ol>
<Link to="/profile" data-testid="link-to-profile">
<li>
Profile
</li>
</Link>
<Link to="/favorites" data-testid="link-to-favorites">
<li>Favotires</li>
</Link>
<Link to="/search" data-testid="link-to-search">
<li>Search</li>
</Link>
</ol>
<h3 data-testid="header-user-name">
{name}
</h3>
</div>
)}
</header>
);
Expand Down

0 comments on commit 31700b3

Please sign in to comment.