diff --git a/src/pages/home.tsx b/src/pages/home.tsx index 570830a7..3990bb82 100644 --- a/src/pages/home.tsx +++ b/src/pages/home.tsx @@ -23,6 +23,7 @@ interface Highlight { title: string; name: string; url: string; + login: string; } @@ -57,16 +58,13 @@ const Home = () => { setCurrentPage(prevPage => prevPage + 1); }; - const formatNameForLink = (name: string): string => name.replace(/\s/g, ""); - useEffect(() => { // Update the current name when the highlight changes - if (highlights[currentPage]?.name) { - setCurrentName(formatNameForLink(highlights[currentPage].name)); + if (highlights[currentPage]?.login) { + setCurrentName(highlights[currentPage].login); } }, [highlights, currentPage]); - return (
@@ -119,13 +117,13 @@ const Home = () => { - {highlights[currentPage]?.name} + {highlights[currentPage]?.login}