Compare commits

...

1 Commits

Author SHA1 Message Date
Eric Lewis
9f25059c3c feat: see all button functions 2024-04-09 14:34:04 -04:00
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 { Heading } from 'components/shared/Heading';
import ActivityCard from './ActivityCard'; import ActivityCard from './ActivityCard';
import { Button } from 'components/shared/Button'; 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 = ({ export const Activity = ({
isLoading, isLoading,
activities, activities,
repoPath,
}: { }: {
isLoading: boolean; isLoading: boolean;
activities: GitCommitWithBranch[]; activities: GitCommitWithBranch[];
repoPath: string;
}) => { }) => {
return ( return (
<div className="col-span-5 md:col-span-2 mr-1"> <div className="col-span-5 md:col-span-2 mr-1">
<div className="flex items-center justify-between"> <div className="flex items-center justify-between">
<Heading className="text-lg leading-6 font-medium">Activity</Heading> <Heading className="text-lg leading-6 font-medium">Activity</Heading>
<Button variant="tertiary" size="sm"> <Link to={`https://github.com/${repoPath}/activity`} target="_blank">
See all <Button
</Button> variant="tertiary"
size="sm"
rightIcon={
<LinkIcon className="group-hover:rotate-45 transition-transform" />
}
>
See all
</Button>
</Link>
</div> </div>
<div className="mt-5"> <div className="mt-5">
{isLoading ? ( {isLoading ? (

View File

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

View File

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