feat: see all button functions

This commit is contained in:
Eric Lewis 2024-04-09 14:34:04 -04:00
parent f38dfb5604
commit 9f25059c3c
3 changed files with 24 additions and 5 deletions

View File

@ -4,22 +4,33 @@ import { GitCommitWithBranch } from 'types';
import { Heading } from 'components/shared/Heading';
import ActivityCard from './ActivityCard';
import { Button } from 'components/shared/Button';
import { LoadingIcon } from 'components/shared/CustomIcon';
import { LoadingIcon, LinkIcon } from 'components/shared/CustomIcon';
import { Link } from 'react-router-dom';
export const Activity = ({
isLoading,
activities,
repoPath,
}: {
isLoading: boolean;
activities: GitCommitWithBranch[];
repoPath: string;
}) => {
return (
<div className="col-span-5 md:col-span-2 mr-1">
<div className="flex items-center justify-between">
<Heading className="text-lg leading-6 font-medium">Activity</Heading>
<Button variant="tertiary" size="sm">
See all
</Button>
<Link to={`https://github.com/${repoPath}/activity`} target="_blank">
<Button
variant="tertiary"
size="sm"
rightIcon={
<LinkIcon className="group-hover:rotate-45 transition-transform" />
}
>
See all
</Button>
</Link>
</div>
<div className="mt-5">
{isLoading ? (

View File

@ -16,6 +16,7 @@ import { ChevronLeft } from 'components/shared/CustomIcon';
import { WavyBorder } from 'components/shared/WavyBorder';
import { Heading } from 'components/shared/Heading';
import { Tabs } from 'components/shared/Tabs';
import { LinkIcon } from 'components/shared/CustomIcon';
const Id = () => {
const { id } = useParams();
@ -88,6 +89,9 @@ const Id = () => {
{...buttonSize}
className="h-11 transition-colors"
variant="tertiary"
rightIcon={
<LinkIcon className="group-hover:rotate-45 transition-transform" />
}
>
Open repo
</Button>

View File

@ -221,7 +221,11 @@ const OverviewTabPanel = () => {
</p>
)}
</div>
<Activity activities={activities} isLoading={fetchingActivities} />
<Activity
activities={activities}
isLoading={fetchingActivities}
repoPath={project.repository}
/>
</div>
);
};