Skip to content

Commit

Permalink
feat: personal-links feature added to core workers and maintainers 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
yashsehgal committed Sep 19, 2021
1 parent 5261c7f commit 3ec4b1c
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 14 deletions.
12 changes: 10 additions & 2 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@ import Footer from "./components/section-components/Footer";
import Header from "./components/section-components/Header";
import './styles/index.css';
import Careers from "./views/Careers";
import Discord from "./views/Discord";
import Discord from "./views/Redirect/Discord";
import LandingPage from "./views/LandingPage";
import Products from "./views/Products";
import Team from "./views/Team";
import Twitter from "./views/Redirect/Twitter";
import GitHub from "./views/Redirect/GitHub";
import LinkedIn from "./views/Redirect/Linkedin";
import PersonalLinks from "./views/PersonalLinks";

function App() {
return (
Expand All @@ -19,8 +23,12 @@ function App() {
<Route path="/team" exact component={Team} />
<Route path="/products" exact component={Products} />
<Route path="/careers" exact component={Careers} />
{/* route for re-directing to the discord server */}
{/* routes for re-direction to external links */}
<Route path="/discord" exact component={Discord} />
<Route path="/twitter" exact component={Twitter} />
<Route path="/github" exact component={GitHub} />
<Route path="/linkedin" exact component={LinkedIn} />
<Route path="/yash" exact component={() => PersonalLinks('yash')} />
</BrowserRouter>
{/* footer component */}
<Footer />
Expand Down
12 changes: 0 additions & 12 deletions src/views/Discord/index.js

This file was deleted.

17 changes: 17 additions & 0 deletions src/views/PersonalLinks/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// eslint-disable-next-line
import React, { useEffect } from 'react';

export default function PersonalLinks(__Identifier) {
let url = "/";
if (__Identifier.toLowerCase() === 'yash') {
url = "https://yashsehgal.github.io/portfolio_v_2";
}
useEffect(() => {
window.location.href = url;
}, []);
return (
<div className="github-view">
Redirecting to {__Identifier}'s personal page...
</div>
)
}

0 comments on commit 3ec4b1c

Please sign in to comment.