diff --git a/src/equicordplugins/githubRepos/components/GitHubReposComponent.tsx b/src/equicordplugins/githubRepos/components/GitHubReposComponent.tsx index 9dcdfd99d..67aa4029e 100644 --- a/src/equicordplugins/githubRepos/components/GitHubReposComponent.tsx +++ b/src/equicordplugins/githubRepos/components/GitHubReposComponent.tsx @@ -6,8 +6,9 @@ import { classNameFactory } from "@api/Styles"; import { BaseText } from "@components/BaseText"; +import { Button, TextButton } from "@components/Button"; import { openModal } from "@utils/modal"; -import { Button, React, useEffect, UserProfileStore, useState } from "@webpack/common"; +import { React, useEffect, UserProfileStore, useState } from "@webpack/common"; import { settings } from ".."; import { fetchReposByUserId, fetchReposByUsername, fetchUserInfo, GitHubUserInfo } from "../githubApi"; @@ -15,6 +16,8 @@ import { GitHubRepo } from "../types"; import { RepoCard } from "./RepoCard"; import { ReposModal } from "./ReposModal"; +export const cl = classNameFactory("vc-github-repos-"); + export function GitHubReposComponent({ id, theme }: { id: string, theme: string; }) { const [repos, setRepos] = useState([]); const [loading, setLoading] = useState(true); @@ -22,8 +25,6 @@ export function GitHubReposComponent({ id, theme }: { id: string, theme: string; const [userInfo, setUserInfo] = useState(null); const [returnJustButton, setReturnJustButton] = useState(false); - const cl = classNameFactory("vc-github-repos-"); - const openReposModal = () => { if (!userInfo) return; @@ -101,9 +102,8 @@ export function GitHubReposComponent({ id, theme }: { id: string, theme: string; return ( + ); diff --git a/src/equicordplugins/githubRepos/components/ReposModal.tsx b/src/equicordplugins/githubRepos/components/ReposModal.tsx index eeac8e39d..55ca21b74 100644 --- a/src/equicordplugins/githubRepos/components/ReposModal.tsx +++ b/src/equicordplugins/githubRepos/components/ReposModal.tsx @@ -4,12 +4,14 @@ * SPDX-License-Identifier: GPL-3.0-or-later */ +import { Button } from "@components/Button"; import { HeadingPrimary } from "@components/Heading"; import { ModalContent, ModalFooter, ModalHeader, ModalRoot } from "@utils/modal"; -import { Button, React } from "@webpack/common"; +import { React } from "@webpack/common"; import { getLanguageColor } from "../colors"; import { GitHubRepo } from "../types"; +import { cl } from "./GitHubReposComponent"; import { Star } from "./Star"; interface ReposModalProps { @@ -33,18 +35,18 @@ export function ReposModal({ repos, username, rootProps }: ReposModalProps) { const renderTableRow = (repo: GitHubRepo) => ( window.open(repo.html_url, "_blank")}> -
{repo.name}
+
{repo.name}
-
+
{repo.description || ""}
{repo.language && ( -
+
{repo.language} @@ -52,8 +54,8 @@ export function ReposModal({ repos, username, rootProps }: ReposModalProps) { )} -
- +
+ {repo.stargazers_count.toLocaleString()}
@@ -61,15 +63,15 @@ export function ReposModal({ repos, username, rootProps }: ReposModalProps) { ); return ( - + - + {username}'s GitHub Repositories - -
- + +
+
@@ -85,13 +87,15 @@ export function ReposModal({ repos, username, rootProps }: ReposModalProps) {