This commit is contained in:
IDONTSUDO 2023-11-16 00:40:35 +03:00
parent 8ecb036b1d
commit d70253d6a6
33 changed files with 201 additions and 81 deletions

View file

@ -1,18 +1,35 @@
import * as React from "react";
import { AllProjectStore } from "./all_projects_store";
import { ProjectRepository } from "../data/project_repository";
import { LoadPage } from "../../../core/ui/pages/load_page";
import { observer } from "mobx-react-lite";
import { SelectProjectScreenPath } from "../../select_project/presentation/select_project";
import { Header } from "../../../core/ui/header/header";
export const AllProjectScreenPath = "/";
export const AllProjectScreen: React.FunctionComponent = () => {
export const AllProjectScreen: React.FunctionComponent = observer(() => {
const [allProjectStore] = React.useState(
() => new AllProjectStore(new ProjectRepository())
);
return (
<>
<Header
path={SelectProjectScreenPath}
<LoadPage
largeText={"Projects"}
minText={"select instance project?"}
needBackButton={true}
needBackButton={false}
minText="create project?"
path={SelectProjectScreenPath}
isError={allProjectStore.isError}
isLoading={allProjectStore.isLoading}
children={
<div>
{allProjectStore.projectsModels?.map((el) => {
return <div>{el.description}</div>;
})}
</div>
}
/>
</>
);
};
});