Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

Commit

Permalink
removes the hot repo cards
Browse files Browse the repository at this point in the history
  • Loading branch information
bdougie committed Apr 3, 2024
1 parent 303304b commit 67ad4bb
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
6 changes: 1 addition & 5 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,14 @@ import Footer from "./components/Footer";
import PrimaryNav from "./components/PrimaryNav";
import RepoListWrap from "./components/RepoListWrap";
import { initiatePostHog } from "./lib/analytics";
import { BrowserRouter, Route, Routes } from "react-router-dom";
import { BrowserRouter } from "react-router-dom";
import { Toaster } from "react-hot-toast";
import { SWRConfig } from "swr";
import GradBackground from "./components/GradBackground";
import Hero from "./components/Hero";
import apiFetcher from "./hooks/useSWR";

import getAppVersion from "./lib/appVersion";
import RecentRepoListWrap from "./components/RecentRepoListWrap";
import SecondaryNav from "./components/SecondaryNav";
import HotRepositories from "./components/HotRepositories";

console.log(
`%c
Expand Down Expand Up @@ -47,7 +44,6 @@ const App = (): JSX.Element => {
</GradBackground>

<div className="bg-darkestGrey">
<HotRepositories />
<RepoListWrap />
</div>

Expand Down
2 changes: 1 addition & 1 deletion src/components/ListRepositories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const ListRepositories = ({ activeLink, fetchedData, title }: ListRepositoriesPr
}

return (
<div className="mx-auto max-w-7xl px-4 pb-1 mt-10">
<div className="mx-auto max-w-7xl px-4 pb-1 pt-10">
<div className="flex flex-col gap-y-5 mb-12">
<div className="flex items-center gap-x-2.5">
<BsFillCalendar2Fill className="w-8 h-8 text-white" />
Expand Down
11 changes: 11 additions & 0 deletions src/lib/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,21 @@ const getRepoLink = (repoName: string | null) =>
const getRepoIssuesLink = (repoName: string | null) =>
`https://github.com/${repoName && `${repoName}/issues` || ""}`;

async function userStatusCode(owner: String) {
const apiUserUrl = `https://api.github.com/users/${owner}`;
const response = await fetch(apiUserUrl);
const {login} = await response.json();
if (apiUserUrl !== response.url) {
return [301, login];
} else {
return [response.status,""];
}
}

export {
getAvatarLink,
getProfileLink,
getRepoLink,
getRepoIssuesLink,
userStatusCode,
};

0 comments on commit 67ad4bb

Please sign in to comment.