Skip to content

Commit afcc7bb

Browse files
committed
docs(page-repo): add base docs
#15
1 parent 4aa4a16 commit afcc7bb

File tree

6 files changed

+24
-0
lines changed

6 files changed

+24
-0
lines changed

src/features/repo-details/index.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,25 @@ import "./index.scss";
99
// !!! FIXME: decompose
1010

1111
type Props = {
12+
/** repo identity */
1213
repo: RepoIdentity;
1314
};
1415

16+
// FIXME: move to models
1517
type Collaborator = {
18+
/** id */
1619
id: string;
20+
/** Имя пользователя */
1721
name: string;
22+
/** Логин пользователя */
1823
login: string;
24+
/** Аватар */
1925
avatarUrl: string;
2026
};
2127

28+
/**
29+
* @feature Информация по репозиторию
30+
*/
2231
const RepoDetails = ({ repo: identity }: Props) => {
2332
const { data, loading } = useRepoDetailsQuery({
2433
variables: {

src/features/repo-explorer/components/entries-view/index.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ type Props = {
1616
lastCommit?: GitCommit;
1717
};
1818

19+
/**
20+
* Файлы репозитория
21+
*/
1922
const EntriesView = ({ loading, files, lastCommit, className, repo }: Props) => {
2023
const { branch } = useBranch(repo);
2124
return (

src/features/repo-explorer/components/index.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,13 @@ import RepoReadme from "./readme";
77
import { useBranch, useRepoDetails } from "./hooks";
88

99
type Props = {
10+
/** repo identity */
1011
repo: RepoIdentity;
1112
};
1213

14+
/**
15+
* @feature FileExplorer репозитория
16+
*/
1317
const Explorer = ({ repo }: Props) => {
1418
const { branch } = useBranch(repo);
1519
const { loading, data } = useRepoBranchInfoQuery({

src/features/repo-explorer/components/toolbar/index.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ type Props = {
1111
activeBranch: string;
1212
};
1313

14+
/**
15+
* Тулбар репозитория
16+
*/
1417
const RepoToolbar = ({ repo, branches, activeBranch }: Props) => {
1518
const [isBranchDropdownVisible, setBranchDropdownVisible] = useState(false);
1619
return (

src/features/repo-stat/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import "./index.scss";
88
// NOTE: Я просто хотел отобразить статистику без нагромождений...
99

1010
type Props = {
11+
/** repo identity */
1112
repo: RepoIdentity;
1213
};
1314

src/pages/repository/index.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,14 @@ type Props = RouteComponentProps<{
1616
branch?: string;
1717
}>;
1818

19+
/** Стили */
1920
const COL_MAIN = 17;
2021
const COL_SIDEBAR = 6;
2122
const ROW_GUTTER = [24, 16] as [number, number];
2223

24+
/**
25+
* @page Страница репозитория
26+
*/
2327
const RepositoryPage = (props: Props) => {
2428
const { username, repository, branch } = props.match.params;
2529
const identity: RepoIdentity = {

0 commit comments

Comments
 (0)