Skip to content

Commit

Permalink
Add sponsor item in the navbar
Browse files Browse the repository at this point in the history
  • Loading branch information
imad10902 committed Mar 19, 2023
1 parent 09892f2 commit 8f06f1c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
1 change: 1 addition & 0 deletions frontend/src/components/App.js
Expand Up @@ -20,6 +20,7 @@ const App = props => {
<Route path="/projects" component={ProjectPageComponent} />
<Route path="/contact-us" component={HomePageComponent} />
<Route path="/contribute" component={HomePageComponent} />
<Route path="/sponsors" component={HomePageComponent} />
<Route component={PageNotFoundHandler} />
</Switch>
</main>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/home/homeBody/HomeSponsors.js
Expand Up @@ -47,7 +47,7 @@ const HomeSponsors = props => {
require("../../../images/supporter_nvidia.png")
];
return (
<div className="cv-container">
<div className="cv-container" id="sponsors">
<h1 className="cv-home-showcase-heading">{SUPPORT_TITLE}</h1>
<br />
<br />
Expand Down
13 changes: 10 additions & 3 deletions frontend/src/components/navbar/index.js
Expand Up @@ -58,14 +58,15 @@ class Navbar extends Component {
"GCI",
"Team",
"Contribute",
"Sponsors",
"Contact Us"
];
listItems = listItems.map((path, index) => {
if (path === "GSoC") {
return (
<NavbarItem active={false} key={path}>
<Link to="http://gsoc.cloudcv.org" target="_blank">
{path}
<span className="hover-underline-animation">{path}</span>
</Link>
</NavbarItem>
);
Expand All @@ -74,7 +75,7 @@ class Navbar extends Component {
return (
<NavbarItem active={false} key={path}>
<Link to="http://gci.cloudcv.org" target="_blank">
{path}
<span className="hover-underline-animation">{path}</span>
</Link>
</NavbarItem>
);
Expand All @@ -83,7 +84,13 @@ class Navbar extends Component {
let formattedPath = path.toLowerCase().replace(/ /g, "-");
return (
<NavbarItem active={active} key={path}>
<Link to={`/${formattedPath}`}>{path === "" ? "Home" : path}</Link>
<Link to={`/${formattedPath}`}>
{path === "" ? (
<span className="hover-underline-animation">{"Home"}</span>
) : (
<span className="hover-underline-animation">{path}</span>
)}
</Link>
</NavbarItem>
);
});
Expand Down

0 comments on commit 8f06f1c

Please sign in to comment.