Skip to content

Commit

Permalink
content update
Browse files Browse the repository at this point in the history
  • Loading branch information
darsan-in committed Jul 18, 2024
1 parent f37eebd commit ad5dab5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 17 deletions.
12 changes: 3 additions & 9 deletions app/src/components/home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@ import Quote from "./quote";
import Skills from "./skills";
import Topnav from "./topnav";
import { ShortMessage } from "./ui-utils";
import {
fetchGHMeta,
localMetaStructure,
suppressConsoleError,
} from "./utils";
import { fetchGHMeta, localMetaStructure } from "./utils";
import Works from "./works";

export default function HomePage() {
Expand All @@ -24,11 +20,9 @@ export default function HomePage() {
);

useEffect(() => {
/* Suppress error messages */
suppressConsoleError();
/* */
const getSetMeta = async () => {
const expiryInHours = 1;
const expiryInHours = 3;

const localMeta: localMetaStructure = await fetchGHMeta(
communication.github,
Expand All @@ -46,7 +40,7 @@ export default function HomePage() {

return (
<>
{Object.keys(localMeta).length === 0 ? (
{!localMeta.projects ? (
<div className="flex w-full h-full justify-center mt-20">
<Loading className="animate-spin" />
</div>
Expand Down
9 changes: 5 additions & 4 deletions app/src/components/ui-utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ export const ShortMessage = ({
<>
{totalProjects ? (
<>
Over <span className="font-bold">{totalCommits}</span>+ commits,{" "}
<span className="font-bold">{overallDownloadCounts}</span>+ NPM
downloads and <span className="font-bold">{totalProjects}</span>+
projects completed{" "}
Over <span className="font-bold">{overallDownloadCounts}</span>+
User installations,{" "}
<span className="font-bold">{totalCommits}</span>+ Contributions
& <span className="font-bold">{totalProjects}</span>+ projects
completed{" "}
</>
) : (
<Spinner size={20} />
Expand Down
4 changes: 0 additions & 4 deletions app/src/components/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,3 @@ export function experienceDuration(dateString: string) {
remMonths > 1 ? "Months" : "Month"
}`;
}

export function suppressConsoleError() {
console.error = function () {};
}

0 comments on commit ad5dab5

Please sign in to comment.