Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions apps/web/app/(public)/(projects)/[provider]/[org]/[repo]/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import ProjectPage from './project-page';

export default async function Page({
params,
}: {
params: Promise<{ provider: string; org: string; repo: string }>;
}) {
const { provider, org, repo } = await params;

return <ProjectPage provider={provider} org={org} repoId={repo} />;
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ export default function ProjectDescription({
repo,
project,
isOwner,
isNotInDatabase,
}: {
repo: ProjectData;
project: ProjectWithRelations;
isOwner: boolean;
isNotInDatabase: boolean;
}) {
const getAvatarImage = (): string => {
if (repo && repo.owner && typeof repo.owner.avatar_url === 'string') {
Expand All @@ -41,12 +43,14 @@ export default function ProjectDescription({
repoOwnerName={repo?.owner?.name || repo?.namespace?.name || ''}
className="h-12 w-12 flex-shrink-0 rounded-none md:h-16 md:w-16"
/>

<div className="w-full flex-1">
<ProjectTitleAndTicks
project={project}
className="truncate text-lg font-bold text-white sm:text-2xl md:text-xl"
isNotInDatabase={isNotInDatabase}
/>
<StatusBadges project={project} />
{!isNotInDatabase && <StatusBadges project={project} />}
</div>
</div>

Expand Down Expand Up @@ -110,17 +114,19 @@ function StatusBadges({ project }: { project: ProjectWithRelations }) {
function ProjectTitleAndTicks({
project,
className,
isNotInDatabase,
}: {
project: ProjectWithRelations;
className: string;
isNotInDatabase: boolean;
}) {
return (
<div className="flex items-center justify-between gap-2 md:gap-3">
<div className="flex items-center gap-2 md:gap-3">
<h1 className={className}>{project?.name}</h1>
<ProjectTicks project={project} />
{!isNotInDatabase && <ProjectTicks project={project} />}
</div>
<SocialLinks project={project} />
{!isNotInDatabase && <SocialLinks project={project} />}
</div>
);
}
Expand Down
Loading