Test modülü eklendi
This commit is contained in:
21
frontend/src/components/RepoIcon.tsx
Normal file
21
frontend/src/components/RepoIcon.tsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||
import { faGithub, faGitlab } from "@fortawesome/free-brands-svg-icons";
|
||||
import { faCodeBranch } from "@fortawesome/free-solid-svg-icons";
|
||||
|
||||
export function RepoIcon({ repoUrl }: { repoUrl: string }) {
|
||||
const lower = repoUrl.toLowerCase();
|
||||
if (lower.includes("github.com")) {
|
||||
return <FontAwesomeIcon icon={faGithub} className="h-5 w-5 text-foreground" />;
|
||||
}
|
||||
if (lower.includes("gitlab.com")) {
|
||||
return <FontAwesomeIcon icon={faGitlab} className="h-5 w-5 text-foreground" />;
|
||||
}
|
||||
if (lower.includes("gitea")) {
|
||||
return (
|
||||
<div className="flex h-5 w-5 items-center justify-center rounded-sm bg-emerald-600 text-[10px] font-semibold text-white">
|
||||
Ge
|
||||
</div>
|
||||
);
|
||||
}
|
||||
return <FontAwesomeIcon icon={faCodeBranch} className="h-5 w-5 text-foreground" />;
|
||||
}
|
||||
Reference in New Issue
Block a user