-
-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add collectiv section * fix button padding * fix es6 function * fix media query bug * remove whitespaces * resolve comments * resolve comments * fix gitlab repo * fix font for collectiv section
- Loading branch information
1 parent
a843785
commit 76955ac
Showing
9 changed files
with
112 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { faUpRightFromSquare } from "@fortawesome/free-solid-svg-icons"; | ||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; | ||
|
||
export const CollectivSection = () => { | ||
return ( | ||
<div className="pt-6"> | ||
<h3 className="flex cursor-pointer flex-row items-center text-sm font-bold uppercase tracking-wider text-secondary"> | ||
Get Help | ||
</h3> | ||
<p className="py-2 text-sm"> | ||
Use{" "} | ||
<a | ||
href="https://chat.collectivai.com/hacktober-fest" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
<span className="font-bold text-primary transition-all hover:underline"> | ||
Collectiv | ||
<FontAwesomeIcon | ||
icon={faUpRightFromSquare} | ||
className="mx-1 inline-block h-[12px] w-[12px]" | ||
/>{" "} | ||
</span>{" "} | ||
</a> | ||
to solve Hacktoberfest issues and{" "} | ||
<span className="mb-2 text-sm font-bold tracking-wider text-[#F8F8F8]">win a T-shirt</span>{" "} | ||
& other exciting Merch! | ||
</p> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { Repository } from "../../types"; | ||
|
||
type RepositoryCollectivButtonProps = { | ||
repositoryName: Repository["name"]; | ||
repositoryOwner: Repository["owner"]; | ||
repositoryUrl: Repository["url"]; | ||
}; | ||
export const RepositoryCollectivButton = ({ | ||
repositoryName, | ||
repositoryOwner, | ||
repositoryUrl | ||
}: RepositoryCollectivButtonProps) => { | ||
const ownerAndRepoName = repositoryOwner + "/" + repositoryName; | ||
const isGitLabRepo = repositoryUrl.includes("gitlab.com"); | ||
|
||
return ( | ||
<a | ||
href={ | ||
isGitLabRepo | ||
? `https://chat.collectivai.com/contribute?repo-name=${ownerAndRepoName}&gitLab=true` | ||
: `https://chat.collectivai.com/contribute?repo-name=${ownerAndRepoName}` | ||
} | ||
className="m-2 flex items-center justify-center | ||
gap-2 rounded-lg border border-primary p-2 text-sm font-semibold | ||
md:m-0 md:ml-2 md:rounded-full md:border-transparent md:bg-primary md:px-3" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
Solve with Collectiv | ||
</a> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,32 @@ | ||
import { Issue } from "../../types"; | ||
import { Issue, Repository } from "../../types"; | ||
import { RepositoryCollectivButton } from "../Collectiv/RepositoryCollectivButton"; | ||
|
||
import { IssueItem } from "./IssueItem"; | ||
|
||
type IssueListProps = { | ||
issues: Issue[]; | ||
repositoryDetails: { | ||
name: Repository["name"]; | ||
owner: Repository["owner"]; | ||
url: Repository["url"]; | ||
}; | ||
}; | ||
|
||
export const IssuesList = ({ issues }: IssueListProps) => { | ||
export const IssuesList = ({ issues, repositoryDetails }: IssueListProps) => { | ||
return ( | ||
<ol className="border-t border-dark-200 px-5 py-3 text-base leading-loose"> | ||
{issues.map((issue) => ( | ||
<IssueItem issue={issue} key={issue.id} /> | ||
))} | ||
</ol> | ||
<> | ||
<ol className="border-t border-dark-200 px-5 py-3 text-base leading-loose"> | ||
{issues.map((issue) => ( | ||
<IssueItem issue={issue} key={issue.id} /> | ||
))} | ||
</ol> | ||
<div className="md:hidden"> | ||
<RepositoryCollectivButton | ||
repositoryName={repositoryDetails.name} | ||
repositoryOwner={repositoryDetails.owner} | ||
repositoryUrl={repositoryDetails.url} | ||
/> | ||
</div> | ||
</> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.