set active project

This commit is contained in:
IDONTSUDO 2024-06-10 17:28:13 +03:00
parent 814eb485eb
commit 4e726be376
25 changed files with 58 additions and 151 deletions

View file

@ -30,7 +30,7 @@ export const AllProjectScreen: React.FunctionComponent = observer(() => {
<div>
{store.projectsModels?.map((el) => {
return (
<div style={{ margin: "10px", backgroundColor: "Highlight" }}>
<div style={{ margin: 10, backgroundColor: "chartreuse" }}>
{el.isActive ? (
<Button
onClick={() => {
@ -39,7 +39,7 @@ export const AllProjectScreen: React.FunctionComponent = observer(() => {
>
instance screen
</Button>
) : null}
) : <Button style={{ backgroundColor: 'red' }} onClick={() => store.setActiveProject(el._id as string)}>active project</Button>}
<div style={{ margin: "10px", display: "contents" }}> {el.description}</div>
</div>
);