Skip to content

Commit d618a58

Browse files
Update Navbar from class component to functional component
1 parent 5b05209 commit d618a58

File tree

1 file changed

+24
-25
lines changed

1 file changed

+24
-25
lines changed

src/components/Navbar/Navbar.jsx

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,31 @@
1-
import React, { Component } from 'react';
1+
import React from 'react';
22
import './Navbar.css';
33
import slack from './slack.svg';
44
import youtube from './youtube.svg';
55
import twitter from './twitter.svg';
66
import github from './github.svg';
7-
class Navbar extends Component {
8-
render() {
9-
return (
10-
<div className="topnav">
11-
<a href="https://join.slack.com/t/firstcontributors/shared_invite/zt-iywfifau-_aMtdwTjBoMzQqzW8~YUUA" target="_blank" rel="noopener noreferrer">
12-
<img src={slack} className="logo" alt="slack logo" />
13-
<span>Slack</span>
14-
</a>
15-
<a href="https://www.youtube.com/channel/UCMXNFxCvyH5LhUwEcmY8qGQ" target="_blank" rel="noopener noreferrer">
16-
<img src={youtube} className="logo" alt="youtube logo" />
17-
<span>Youtube</span>
18-
</a>
19-
<a href="https://twitter.com/1stContribution" target="_blank" rel="noopener noreferrer">
20-
<img src={twitter} className="logo" alt="twitter logo" />
21-
<span>Twitter</span>
22-
</a>
23-
<a href="https://github.com/firstcontributions/first-contributions" target="_blank" rel="noopener noreferrer">
24-
<img src={github} className="logo" alt="github logo" />
25-
Github
26-
</a>
27-
</div>
28-
);
29-
}
30-
}
7+
8+
const Navbar = () => {
9+
return (
10+
<div className="topnav">
11+
<a href="https://join.slack.com/t/firstcontributors/shared_invite/zt-iywfifau-_aMtdwTjBoMzQqzW8~YUUA" target="_blank" rel="noopener noreferrer">
12+
<img src={slack} className="logo" alt="slack logo" />
13+
<span>Slack</span>
14+
</a>
15+
<a href="https://www.youtube.com/channel/UCMXNFxCvyH5LhUwEcmY8qGQ" target="_blank" rel="noopener noreferrer">
16+
<img src={youtube} className="logo" alt="youtube logo" />
17+
<span>Youtube</span>
18+
</a>
19+
<a href="https://twitter.com/1stContribution" target="_blank" rel="noopener noreferrer">
20+
<img src={twitter} className="logo" alt="twitter logo" />
21+
<span>Twitter</span>
22+
</a>
23+
<a href="https://github.com/firstcontributions/first-contributions" target="_blank" rel="noopener noreferrer">
24+
<img src={github} className="logo" alt="github logo" />
25+
Github
26+
</a>
27+
</div>
28+
);
29+
};
3130

3231
export default Navbar;

0 commit comments

Comments
 (0)