.ts
TypeScript
(application/typescript)
// 1st-party
import type { ReactView } from "@ethicdevs/react-monolith";
// 3rd-party
import React from "react";
// generated via script[generate:prisma]
import type { Organization, PullRequest, Repository } from "@prisma/client";
// app
import type { CommonProps } from "../../types";
import { Grid, Layout, PageWrapper } from "../../components";
// app islands
// import RepositoriesList from "../../islands/RepositoriesList";

export interface RepositoryPullRequestsViewProps extends CommonProps {
  parentOrg: Organization;
  pullRequests: PullRequest[];
  repo: Repository;
}

const RepositoryPullRequestsView: ReactView<
  RepositoryPullRequestsViewProps
> = ({ commonProps, parentOrg, pullRequests, repo }) => {
  return (
    <Layout {...commonProps}>
      <PageWrapper>
        <h1>
          <a href={`/${parentOrg.slug}`}>
            {parentOrg.displayName || parentOrg.slug}
          </a>
          {" / "}
          <a href={`/${parentOrg.slug}/${repo.slug}`}>
            {repo.displayName || repo.slug}
          </a>
          {" ∙ "}
          <span>Pull Requests</span>
        </h1>
        <Grid.Row fluid style={{ marginTop: 32 }}>
          {JSON.stringify(pullRequests, null, 2)}
          {/*<div
            data-islandid={`${RepositoriesList.name}$$0`}
            style={{ width: "100%" }}
          >
            <RepositoriesList repositories={repositories} />
          </div>*/}
        </Grid.Row>
      </PageWrapper>
    </Layout>
  );
};

RepositoryPullRequestsView.displayName = "RepositoryPullRequestsView";
export default RepositoryPullRequestsView;