import * as React from "react"; import { AllProjectStore } from "./all_projects_store"; import { observer } from "mobx-react-lite"; import { useNavigate } from "react-router-dom"; import { Modal, Upload } from "antd"; import { PreviewPage } from "../../../core/ui/pages/preview_page"; import { CoreText, CoreTextType } from "../../../core/ui/text/text"; import { CoreButton } from "../../../core/ui/button/button"; import { CoreInput } from "../../../core/ui/input/input"; import { DetailsScreenPath } from "../../details/details_screen"; export const AllProjectScreenPath = "/"; export const AllProjectScreen: React.FunctionComponent = observer(() => { const [store] = React.useState(() => new AllProjectStore()); const navigate = useNavigate(); React.useEffect(() => { store.init(); }, []); return ( store.showModal()} isError={false} isLoading={store.isLoading} children={ <> {store.projectsModels?.map((el) => { return (
{el.isActive ? ( { navigate(`${DetailsScreenPath}`); }} textStyle={{ color: "black",textAlign:'center' }} style={{ marginRight: 10, backgroundColor: "white", width: 126 }} /> ) : ( store.setActiveProject(el._id as string)} style={{ marginRight: 10, width: 126 }} filled={true} /> )}
); })} store.setDescriptionToNewProject(text)} />
{ store.file = e.file.originFileObj; }} >
store.saveProject()} style={{ marginRight: 10 }} filled={true} /> store.handleCancel()} style={{ marginRight: 10 }} />
} /> ); });